lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tomer Levi <Tomer.L...@nice.com>
Subject Ignoring Duplicates in Multivalue Field
Date Sun, 02 Nov 2014 11:22:17 GMT
Hi,
I'm trying to make my "update" request handler ignore multivalue duplications in updates.
To make my use case clear, let's assume my index already contains a document like:
{
   id:"100",
 "myMultValueField": ["1","2","3"]
}

Later I would like to send an update like:
{
   id:"100","
   myMultValueField" {"add":"2"}
}

How can I make the update request handler understand that "2" already exist and ignore it?
I tried to add update chain below but it didn't work for me.

<updateRequestProcessorChain name="uniq-fields">
                   <processor class="solr.UniqFieldsUpdateProcessorFactory">
                                <str name="fieldRegex"> myMultValueField </str>
                  </processor>
   </updateRequestProcessorChain>

And add it to my requestHandler:
<requestHandler name="/update" class="solr.UpdateRequestHandler">
           <lst name="defaults">
             <str name="update.chain">uniq-fields</str>
           </lst>
    </requestHandler>

Tomer Levi

Software Engineer
Big Data Group

Product & Technology Unit

(T) +972 (9) 775-2693



tomer.levi@nice.com<mailto:tomer.levi@nice.com>

www.nice.com<http://www.nice.com/>

[cid:image001.png@01CFF69B.BA456EB0]<http://twitter.com/NICE_Systems/>[cid:image002.png@01CFF69B.BA456EB0]<http://www.facebook.com/pages/NICE-Systems/149072782602/>[cid:image003.png@01CFF69B.BA456EB0]<http://www.linkedin.com/company/nice-systems>[cid:image004.png@01CFF69B.BA456EB0]<http://www.nice.com/blog>




[cid:image005.jpg@01CFF69B.BA456EB0]<http://www.nice.com/big-data-solutions>




Mime
  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message