lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sha...@apache.org
Subject svn commit: r884263 - in /lucene/solr/trunk: CHANGES.txt src/java/org/apache/solr/schema/IndexSchema.java
Date Wed, 25 Nov 2009 20:47:54 GMT
Author: shalin
Date: Wed Nov 25 20:47:54 2009
New Revision: 884263

URL: http://svn.apache.org/viewvc?rev=884263&view=rev
Log:
SOLR-1570 -- Log warnings if uniqueKey is multi-valued or not stored

Modified:
    lucene/solr/trunk/CHANGES.txt
    lucene/solr/trunk/src/java/org/apache/solr/schema/IndexSchema.java

Modified: lucene/solr/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/CHANGES.txt?rev=884263&r1=884262&r2=884263&view=diff
==============================================================================
--- lucene/solr/trunk/CHANGES.txt (original)
+++ lucene/solr/trunk/CHANGES.txt Wed Nov 25 20:47:54 2009
@@ -106,6 +106,8 @@
 
 * 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
 ----------------------
 

Modified: lucene/solr/trunk/src/java/org/apache/solr/schema/IndexSchema.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/schema/IndexSchema.java?rev=884263&r1=884262&r2=884263&view=diff
==============================================================================
--- lucene/solr/trunk/src/java/org/apache/solr/schema/IndexSchema.java (original)
+++ lucene/solr/trunk/src/java/org/apache/solr/schema/IndexSchema.java Wed Nov 25 20:47:54
2009
@@ -600,6 +600,12 @@
       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);



Mime
View raw message