Make the ID field out of the query text so you don't have to use the
dedup component, then use the updatable fields functionality in Solr
4.0:

$ curl http://localhost:8983/solr/update -H
'Content-type:application/json' -d '
[
 {"id"        : "book1",
  "copies_i"  : { "inc" : 1},
  "cat"       : { "add" : "fantasy"},
  "ISBN_s"    : { "set" : "0-380-97365-0"}
  "remove_s"  : { "set" : null } }
]'

/* example stolen from Yonik's ApacheCon talk */

Upayavira


On Sat, Dec 15, 2012, at 01:34 AM, Jorge Luis Betancourt Gonzalez wrote:
> Hi all:
> 
> I'm trying to build a query suggestion system using solr (also used to
> index all the data in the app). I've a separated core dedicated only for
> this purpose (along with some other for images, etc.). In the main app,
> written in Symfoy2 + Solarium Bundle, we store the queries in this core,
> to prevent the indexing of duplicated queries, I use the dedup component:
> 
> <!--
>  Delete similar duplicated documents on index time, using some fuzzy text
>  similary techniques 
> -->
> <updateRequestProcessorChain name="dedupe">
> <processor
> class="org.apache.solr.update.processor.SignatureUpdateProcessorFactory">
> <bool name="enabled">true</bool>
> <bool name="overwriteDupes">false</bool>
> <str name="signatureField">signature</str>
> <str name="fields">textsuggest,textng</str>
> <str name="signatureClass">
> org.apache.solr.update.processor.TextProfileSignature
> </str>
> </processor>
> <processor class="solr.LogUpdateProcessorFactory"/>
> <processor class="solr.RunUpdateProcessorFactory"/>
> </updateRequestProcessorChain>
> 
> Which prevent the store of very similar queries, but with this
> configuration, but what I really trying to accomplish is to increment a
> count (popularity) field when the same query is sent to solr.
> 
> Any thought on this?
> 
> Greetings!
> 
> 10mo. ANIVERSARIO DE LA CREACION DE LA UNIVERSIDAD DE LAS CIENCIAS
> INFORMATICAS...
> CONECTADOS AL FUTURO, CONECTADOS A LA REVOLUCION
> 
> http://www.uci.cu
> http://www.facebook.com/universidad.uci
> http://www.flickr.com/photos/universidad_uci

Reply via email to