lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Russell Black (Updated) (JIRA)" <>
Subject [jira] [Updated] (SOLR-3222) Pull optimal cache warming queries from a warm solr instance
Date Fri, 09 Mar 2012 06:00:00 GMT


Russell Black updated SOLR-3222:

    Attachment: SOLR-3222-autowarm.patch
> Pull optimal cache warming queries from a warm solr instance
> ------------------------------------------------------------
>                 Key: SOLR-3222
>                 URL:
>             Project: Solr
>          Issue Type: New Feature
>          Components: search
>    Affects Versions: 3.5, 4.0
>            Reporter: Russell Black
>              Labels: patch, performance
>         Attachments: SOLR-3222-autowarm.patch
> Ever wondered what queries to use to prime your cache?  This patch allows you to query
a warm running instance for a list of warming queries.  The list is generated from the server's
caches, meaning you get back an optimal set of queries.  The set is  optimal to the extent
that the caches are optimized.  The queries are returned in a format that can be consumed
by the {code:xml}<listener event="firstSearcher" class="solr.QuerySenderListener">{code}
section of {{solrconfig.xml}}.  
> One can use this feature to generate a static set of good warming queries to place in
{{solrconfig.xml}} under {code:xml}<listener event="firstSearcher" class="solr.QuerySenderListener">{code}
> It can even be used in a dynamic fashion like this:
> {code:xml}
> <listener event="firstSearcher" class="solr.QuerySenderListener">
>   <xi:include href="http://host/solr/core/autowarm" xpointer="element(/1/2)" xmlns:xi=""/>
> </listener>
> {code}
> which can work well in certain distributed load-balanced architectures, although in production
it would be wise to add an {{<xi:fallback>}} element to the include in the event that
the host is down.
> I implemented this by introducing a new request handler:
> {code:xml}
>   <requestHandler name="/autowarm" class="solr.AutoWarmRequestHandler" />
> {code}
> The request handler pulls a configurable number of "top" keys from the {{filterCache}},{{fieldValueCache}},
and {{queryResultCache}}.  For each key, it constructs a query that will cause that key to
be placed in the associated cache.  The list of constructed queries are then returned in the
> Patch to follow.  

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message