lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jack Krupansky" <>
Subject Re: UUIDField uniqueKey with default="NEW"
Date Fri, 31 Aug 2012 23:35:01 GMT
You're trying to use a feature that was removed from trunk/4x by SOLR-2796: 
"AddUpdateCommand.getIndexedId doesn't work with schema configured 
defaults/copyField - UUIDField/copyField can not be used as uniqueKey 


This revision:

Evidently the wiki was not corrected to note that the "feature" was removed.

-- Jack Krupansky

-----Original Message----- 
From: Ahmet Arslan
Sent: Friday, August 31, 2012 7:07 PM
Subject: UUIDField uniqueKey with default="NEW"

Hi all,

I was following to 
setup uuid as my uniqueKey. (recent solr-trunk)

<fieldType name="uuid" class="solr.UUIDField" indexed="true" />

<field name="uniqueKey" type="uuid" indexed="true" stored="true" 
default="NEW" required="true" />


I get the following exception.

SEVERE: null:org.apache.solr.common.SolrException: uniqueKey field (null) 
can not be configured with a default value (NEW)
at org.apache.solr.schema.IndexSchema.readSchema(
at org.apache.solr.schema.IndexSchema.<init>(
at org.apache.solr.core.CoreContainer.create(
at org.apache.solr.core.CoreContainer.load(

I made this working by adding some if checks to and


But I am not sure if this is preferred way.  How can I use uuid as my 
uniqueKey without source code modification?


To unsubscribe, e-mail:
For additional commands, e-mail: 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message