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 arian487 <ak...@tagged.com> on 2011/06/18 00:26:42 UTC
Caching queries.
I'm wondering if something like this is possible. Lets say I want to query
5000 objects all pertaining to a specific search and I want to return the
top 100 or something and cache the rest on my solr server. The next time I
get the same query or something with a new offset (lets say start from 101)
does it have to do the query again or can it go to cache and get the next
100?
--
View this message in context: http://lucene.472066.n3.nabble.com/Caching-queries-tp3078271p3078271.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Caching queries.
Posted by arian487 <ak...@tagged.com>.
Thanks, this is exactly what I'm looking for!
--
View this message in context: http://lucene.472066.n3.nabble.com/Caching-queries-tp3078271p3087497.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Caching queries.
Posted by Shawn Heisey <el...@elyograg.org>.
On 6/17/2011 4:26 PM, arian487 wrote:
> I'm wondering if something like this is possible. Lets say I want to query
> 5000 objects all pertaining to a specific search and I want to return the
> top 100 or something and cache the rest on my solr server. The next time I
> get the same query or something with a new offset (lets say start from 101)
> does it have to do the query again or can it go to cache and get the next
> 100?
In solrconfig.xml, you should have a <query> section. In that section,
you can place a setting like the following:
<queryResultWindowSize>200</queryResultWindowSize>
This is described in the example solrconfig.xml and here:
http://wiki.apache.org/solr/SolrCaching#queryResultWindowSize
Shawn
Re: Caching queries.
Posted by Erick Erickson <er...@gmail.com>.
Well, it depends on how you've set the parameters in solrconfig.xml
for the queryResultWindowSize. Note that this size is simply
the size of a list of integers, so it's not a very expensive cache.
Best
Erick
On Fri, Jun 17, 2011 at 6:26 PM, arian487 <ak...@tagged.com> wrote:
> I'm wondering if something like this is possible. Lets say I want to query
> 5000 objects all pertaining to a specific search and I want to return the
> top 100 or something and cache the rest on my solr server. The next time I
> get the same query or something with a new offset (lets say start from 101)
> does it have to do the query again or can it go to cache and get the next
> 100?
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Caching-queries-tp3078271p3078271.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>