You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by sunnyfr <jo...@gmail.com> on 2009/04/02 10:43:48 UTC

Re: autowarm static queries

Hi Hoss,

Do I need autowarming > 0 to have newSearcher and firstSearcher fired?

Thanks a lot,


hossman wrote:
> 
> 
> : Subject: autowarm static queries
> 
> A minor followup about terminology:
> 
> "auto-warming" describes what Solr does when it opens a new cache, and 
> seeds it with key/val pairs based on the "top" keys from the old instance 
> of the cache.
> 
> "static warming" describes what you can do using newSearcher and 
> firstSearcher event listeners to force explicit warming actions to be 
> taken when one of these events happens -- frequently it involves seeding 
> one or more caches with values from "static" queries hard coded in the 
> solrconfig.xml
> 
> i'm not sure what it would mean to autowarm a static query.
> 
> 
> -Hoss
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/autowarm-partial-queries-in-solrconfig.xml-tp13167933p22843453.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: autowarm static queries

Posted by sunnyfr <jo...@gmail.com>.
Ok so It doesn't seems to work
after a replication, my first request on my slave is always  very long and
next one very quick ??? 
do I have to set something else ?



    <listener event="newSearcher" class="solr.QuerySenderListener">
      <arr name="queries">
        <lst> <str name="q">solr</str> <str name="start">0</str> <str
name="rows">100</str> </lst>
        <lst> <str name="q">anything</str> <str name="sort">id
desc</str></lst>
      </arr>
    </listener>

    <!-- a firstSearcher event is fired whenever a new searcher is being
         prepared but there is no current registered searcher to handle
         requests or to gain autowarming data from. -->
    <listener event="firstSearcher" class="solr.QuerySenderListener">
      <arr name="queries">
        <lst> <str name="q">fast_warm</str> <str name="start">0</str> <str
name="rows">100</str> </lst>
        <!-- seed common sort fields -->
        <lst> <str name="q">anything</str> <str name="sort">id
desc</str></lst>
        <lst> <str name="q">anything</str>
              <str
name="bf">recip(rord(created),1,10,10)^3+pow(stat_views,0.1)^15+pow(stat_comments,0.1)^15</str>
              <str
name="fq">status_published:1+AND+status_moderated:0+AND+status_personal:0+AND+status_private:0+AND+status_deleted:0+AND+status_error:0+AND+status_ready_web:1</str>
              <str
name="bq">status_official:1^1.5+OR+status_creative:1^1+OR+language:en^0.5</str>
              <str
name="qf">title^0.2+description^0.2+tags^1+owner_login^0.5</str>
        </lst>
      </arr>
    </listener>




Shalin Shekhar Mangar wrote:
> 
> On Thu, Apr 2, 2009 at 2:13 PM, sunnyfr <jo...@gmail.com> wrote:
>>
>> Hi Hoss,
>>
>> Do I need autowarming > 0 to have newSearcher and firstSearcher fired?
>>
>> Thanks a lot,
>>
> 
> Did you mean autowarmCount > 0?
> 
> No, firstSearcher and newSearcher are always executed if specified.
> The autowarmCount can be anything, it does not matter.
> 
> -- 
> Regards,
> Shalin Shekhar Mangar.
> 
> 

-- 
View this message in context: http://www.nabble.com/autowarm-partial-queries-in-solrconfig.xml-tp13167933p22844377.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: autowarm static queries

Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
On Thu, Apr 2, 2009 at 2:13 PM, sunnyfr <jo...@gmail.com> wrote:
>
> Hi Hoss,
>
> Do I need autowarming > 0 to have newSearcher and firstSearcher fired?
>
> Thanks a lot,
>

Did you mean autowarmCount > 0?

No, firstSearcher and newSearcher are always executed if specified.
The autowarmCount can be anything, it does not matter.

-- 
Regards,
Shalin Shekhar Mangar.