I've used this before, by specifying the chain as the default processor chain by putting the following directly under the <config> entry:
<initParams path="/update/**"> <lst name="defaults"> <str name="update.chain">uniq-fields</str> </lst> </initParams> Not sure if this is the best way, but since our app is the only one using Solr, we want every update to use the chain across all our collections. -----Original Message----- From: Alexis Aravena Silva [mailto:aarav...@itsofteg.com] Sent: Thursday, March 14, 2019 11:37 AM To: solr-user@lucene.apache.org Subject: Re: Duplicate values in Multi Value Fields Does anyone know how to config this in solrconfig?, the idea is that solr uses it when I execute the data import: <updateRequestProcessorChain name="uniq-fields"> <processor class="org.apache.solr.update.processor.DistributedUpdateProcessorFactory"/> <processor class="org.apache.solr.update.processor.UniqFieldsUpdateProcessorFactory"> <str name="fieldName">_nombreArea_</str> </processor> <processor class="solr.RunUpdateProcessorFactory" /> </updateRequestProcessorChain> <requestHandler name="/update" class="solr.UpdateRequestHandler"> <lst name="defaults"> <str name="update.chain">uniq-fields</str> </lst> </requestHandler> ________________________________ From: Alexis Aravena Silva Sent: Thursday, March 14, 2019 11:26:07 AM To: solr-user@lucene.apache.org Subject: Re: Duplicate values in Multi Value Fields I've tried with the following, but it doesn't work, it seems like solr doesn't take the configuration: <updateRequestProcessorChain name="uniq-fields"> <processor class="org.apache.solr.update.processor.DistributedUpdateProcessorFactory"/> <processor class="org.apache.solr.update.processor.UniqFieldsUpdateProcessorFactory"> <str name="fieldName">_nombreArea_</str> </processor> <processor class="solr.RunUpdateProcessorFactory" /> </updateRequestProcessorChain> <requestHandler name="/update" class="solr.UpdateRequestHandler"> <lst name="defaults"> <str name="update.chain">uniq-fields</str> </lst> </requestHandler> ________________________________ From: MUNENDRA S.N <sn.munendr...@gmail.com> Sent: Thursday, March 14, 2019 11:17:40 AM To: solr-user@lucene.apache.org Subject: Re: Duplicate values in Multi Value Fields Probably you could add-distinct operation for unique values in multivalued fields https://lucene.apache.org/solr/guide/7_3/updating-parts-of-documents.html On Thu, Mar 14, 2019, 7:40 PM Jörn Franke <jornfra...@gmail.com> wrote: > With an update request processor > > https://lucene.apache.org/solr/7_4_0//solr-core/org/apache/solr/update/processor/UniqFieldsUpdateProcessorFactory.html > > > Am 14.03.2019 um 15:01 schrieb Alexis Aravena Silva < > aarav...@itsofteg.com>: > > > > Hello, > > > > > > I'm indexing data into some MultiValueFields, but I have duplicates, > how can I remove the duplicate values at indexing time? > > > > > > I'm using Solr 7. > > > > > > sample: > > > > > > _nombreArea_":["MICROBIOLOGÍA", "QUÍMICA", "MICROBIOLOGÍA", > "MICROBIOLOGÍA", "MICROBIOLOGÍA", "QUÍMICA", "QUÍMICA", "MICROBIOLOGÍA", > "MICROBIOLOGÍA", "QUÍMICA", "MICROBIOLOGÍA", "QUÍMICA"], > > > > > > Regards, > > > > Alexis Aravena S. > > > > > [Nastel Technologies]<http://www.nastel.com/> The information contained in this e-mail and in any attachment is confidential and is intended solely for the use of the individual or entity to which it is addressed. Access, copying, disclosure or use of such information by anyone else is unauthorized. If you are not the intended recipient, please delete the e-mail and refrain from use of such information.