lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: UUIDField uniqueKey with default="NEW"
Date Sat, 01 Sep 2012 00:22:12 GMT

: 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.

correct.

:     <processor class="solr.DefaultValueUpdateProcessorFactory">
:       <str name="fieldName">uniqueKey</str>
:       <str name="value">NEW</str>
:     </processor>    

...that approach won't work, it still relies on the UUIDField class 
accepting "NEW" as input to generate a new key, and that is no longer 
supported -- it happens to "late" in the processing for it to be used as 
the unique key)

This approach is correct...

:     <processor class="solr.UUIDUpdateProcessorFactory">
:       <str name="fieldName">uniqueKey</str>
:     </processor>    

: correct? I will try to update the wiki.

Thank you, i didn't realize that page existed or i would have already done 
it.  you may want to primarily describe the UUIDUpdateProcessorFactory as 
how to generate a UUID for new documents, and then as a closing comment 
mention that in Solr 3, the default="NEW" approach can be used instead.

You could cut/paste verbatim the section from CHANGES.txt on upgrading 
related to this issue...


* Due to low level changes to support SolrCloud, the uniqueKey field can no 
  longer be populated via <copyField/> or <field default=...> in the 
  schema.xml.  Users wishing to have Solr automatically generate a uniqueKey 
  value when adding documents should instead use an instance of
  solr.UUIDUpdateProcessorFactory in their update processor chain.  See 
  SOLR-2796 for more details.





-Hoss

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message