Hey, i have tried to make use of the UniqFieldsUpdateProcessorFactory in
order to achieve distinct values in multivalued fields. Example below:

<updateRequestProcessorChain name="uniq_fields">
   <processor
class="org.apache.solr.update.processor.UniqFieldsUpdateProcessorFactory">
     <lst name="fields">
       <str>title</str>
           <str>tag_type</str>
     </lst>
   </processor>
   <processor class="solr.RunUpdateProcessorFactory" />
 </updateRequestProcessorChain>

 <requestHandler name="/update" class="solr.UpdateRequestHandler">    
   <lst name="defaults">
      <str name="update.chain">uniq_fields</str>
    </lst>
  </requestHandler>

However the data being is indexed one by one. This may happen, since a
document may will get an additional tag in a future update. Unfortunately in
order to ensure not having any duplicate tags, i was hoping, the
UpdateProcessorFactory is doing what i want to achieve. In order to actually
add a tag, i am sending an 

"tag_type" :{"add":"foo"}, which still adds the tag, without questioning if
its already part of the field. How may i be able to achieve distinct values
on solr side?!




--
View this message in context: 
http://lucene.472066.n3.nabble.com/RemoveDuplicatesTokenFilterFactory-to-avoid-import-duplicate-values-in-multivalued-field-tp4029004p4074324.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to