mirror of https://github.com/apache/lucene.git
SOLR-1570 -- Log warnings if uniqueKey is multi-valued or not stored
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@884263 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4afe02ed8e
commit
4b5e8cc326
|
@ -106,6 +106,8 @@ Other Changes
|
|||
|
||||
* SOLR-1561: Added Lucene 2.9.1 spatial contrib jar to lib. (gsingers)
|
||||
|
||||
* SOLR-1570: Log warnings if uniqueKey is multi-valued or not stored (hossman, shalin)
|
||||
|
||||
Build
|
||||
----------------------
|
||||
|
||||
|
|
|
@ -600,6 +600,12 @@ public final class IndexSchema {
|
|||
log.warn("no uniqueKey specified in schema.");
|
||||
} else {
|
||||
uniqueKeyField=getIndexedField(node.getNodeValue().trim());
|
||||
if (!uniqueKeyField.stored()) {
|
||||
log.error("uniqueKey is not stored - distributed search will not work");
|
||||
}
|
||||
if (uniqueKeyField.multiValued()) {
|
||||
log.error("uniqueKey should not be multivalued");
|
||||
}
|
||||
uniqueKeyFieldName=uniqueKeyField.getName();
|
||||
uniqueKeyFieldType=uniqueKeyField.getType();
|
||||
log.info("unique key field: "+uniqueKeyFieldName);
|
||||
|
|
Loading…
Reference in New Issue