You can have a custom SearchComponent and configure a listener to the same. 
 Checkout example/solr/config/solrconfig.xml , regarding configuring custom 
query components , before and after the default list of components, that can 
help provide some of this 'aspect' behavior. 

    <arr name="first-components">
      <str>myFirstComponentName</str>
    </arr>
    
More details, about SearchComponent,  available in the javadoc 
here: http://bit.ly/giz0b1 . 

Override the method  - prepare(ResponseBuilder rb)  , and do a count , based on 
the "q" / other parameters that you get access to , from the ResponseBuilder.  

Be aware that this gets in the way of every search request that hits the solr 
server. So - you need to be careful about how this is persisted (how frequently 
to the datastore etc.) , without being intrusive and adding to the query 
time.  --
  Vijay


>
>From: Selvaraj Varadharajan <selvara...@gmail.com>
>To: dev@lucene.apache.org
>Sent: Mon, February 7, 2011 5:25:18 PM
>Subject: Re: Keyword - search statistics
>
>Thanks Eric.
>What about having another core and interpret the request calls and pool it in 
>that core.. ?
>Do we see any performance hit form your point of view.
>
>-Selvaraj
>
>
>
>On Mon, Feb 7, 2011 at 3:31 PM, Erick Erickson <erickerick...@gmail.com> wrote:
>
>Solr doesn't keep "meta data", so if you're asking for some kind of search
>>logging your app has to provide that...
>>
>>
>>Best
>>Erick
>>
>>
>>
>>On Sun, Feb 6, 2011 at 10:46 PM, Selvaraj Varadharajan <selvara...@gmail.com> 
>>wrote:
>>
>> 
>>>Hi 
>>> 
>>>   Is there any way i can get 'no of times' a key  word searched in SOLR ?
>>>
>>>   
>>>Here is my solr package details
>>>
>>>    Solr Specification Version: 1.4.0
>>>    Solr Implementation Version: 1.4.0 833479 - grantingersoll - 2009-11-06 
>>>12:33:40
>>>    Lucene Specification Version: 2.9.1
>>>    Lucene Implementation Version: 2.9.1 832363 - 2009-11-03 04:37:25
>>>
>>>-Selvaraj
>>>
>>
>

Reply via email to