Firstly, I see that you have overwriteDupes=false in your configuration. This means that a signature will be generated but the similar documents will still be added to the index. Now to your main question about counting duplicate attempts, one simple way is to have another UpdateRequestProcessor after the SignatureUpdateProcessor which keeps a map of Signature to Count. You can even keep this counter inside the Solr document as well and first read the old counter value by querying the signatureField and then writing the new value in the new document. Be careful about race conditions if you're reading from the index because indexing can happen in multiple threads.
On Mon, Dec 16, 2013 at 9:01 AM, Jorge Luis Betancourt González <jlbetanco...@uci.cu> wrote: > Currently I've the following Update Request Processor chain to prevent > indexing very similar text items into a core dedicated to store queries that > our users put into the web interface of our system. > > <!-- 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> > > Right now we are trying to implement a custom update request handler to keep > track of how many any given query hits our solr server, in plain simple we > want to keep a field that counts how many we have tried to insert the same > query. We are using Solr 3.6, so how can we use (from the code of our custom > update handler) the deduplicatin request processor to check if the query we > are trying to insert/update already exists? > > Greetings! > ________________________________________________________________________________________________ > III Escuela Internacional de Invierno en la UCI del 17 al 28 de febrero del > 2014. Ver www.uci.cu -- Regards, Shalin Shekhar Mangar.