lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ahmet Arslan <>
Subject Re: UUIDField uniqueKey with default="NEW"
Date Sat, 01 Sep 2012 00:15:14 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 field."
> See:
> This revision:
> Evidently the wiki was not corrected to note that the
> "feature" was removed.

Thanks Jack that was helpful!
So in order to use uuid as uniqueKey update processor chain is the way to go. There are two
ways to do it.

1) <field name="uniqueKey" type="uuid" indexed="true" stored="true" required="true" />

   <updateRequestProcessorChain name="default-values">
    <processor class="solr.DefaultValueUpdateProcessorFactory">
      <str name="fieldName">uniqueKey</str>
      <str name="value">NEW</str>
  <processor class="solr.RunUpdateProcessorFactory" />

2) <field name="uniqueKey" type="string" indexed="true" stored="true" required="true" />
   <updateRequestProcessorChain name="uuid">    
    <processor class="solr.UUIDUpdateProcessorFactory">
      <str name="fieldName">uniqueKey</str>
    <processor class="solr.RunUpdateProcessorFactory" />

correct? I will try to update the wiki.

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

View raw message