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 s d <s....@gmail.com> on 2008/01/06 06:59:25 UTC
queryResultCache
What is the best approach to tune queryResultCache ?For example the default
size is: size="512" but since a document id is just an int (it is an int,
right?) ,i.e 4 bytes why not set size to 10,000,000 for example (it's only
~38Mb).
I sense there is something that I'm missing here :). any help would be
appreciated.
Thanks,
Re: queryResultCache
Posted by s d <s....@gmail.com>.
Got it. Smart.
Thx
On 1/6/08, Chris Hostetter <ho...@fucit.org> wrote:
>
> : number than the default one and i was wondering is there any disadvantage
> in
> : having a big number/ cache?BTW, where is the TTL controlled ?
>
> no disadvantage as long as you've got the RAM ... NOTE: the magic "512"
> number you refered to isn't a "default" -- it's an "example" in the
> "example"
> solrconfig.xml
>
> There is no TTL for Solr caches, as noted in the wiki...
>
> http://wiki.apache.org/solr/SolrCaching
>
> Solr caches are associated with an Index Searcher -- a particular 'view'
> of the index that doesn't change. So as long as that Index Searcher is
> being used, any items in the cache will be valid and available for reuse.
> Caching in Solr is unlike ordinary caches in that Solr cached objects will
> not expire after a certain period of time; rather, cached objects will be
> valid as long as the Index Searcher is valid.
>
>
>
> -Hoss
>
>
Re: queryResultCache
Posted by Chris Hostetter <ho...@fucit.org>.
: number than the default one and i was wondering is there any disadvantage in
: having a big number/ cache?BTW, where is the TTL controlled ?
no disadvantage as long as you've got the RAM ... NOTE: the magic "512"
number you refered to isn't a "default" -- it's an "example" in the "example"
solrconfig.xml
There is no TTL for Solr caches, as noted in the wiki...
http://wiki.apache.org/solr/SolrCaching
Solr caches are associated with an Index Searcher -- a particular 'view'
of the index that doesn't change. So as long as that Index Searcher is
being used, any items in the cache will be valid and available for reuse.
Caching in Solr is unlike ordinary caches in that Solr cached objects will
not expire after a certain period of time; rather, cached objects will be
valid as long as the Index Searcher is valid.
-Hoss
Re: queryResultCache
Posted by s d <s....@gmail.com>.
Thanks. a factor of 20 or even 30 from my numbers still gives a much larger
number than the default one and i was wondering is there any disadvantage in
having a big number/ cache?BTW, where is the TTL controlled ?
On Jan 6, 2008 7:23 AM, Yonik Seeley <yo...@apache.org> wrote:
> On Jan 6, 2008 12:59 AM, s d <s....@gmail.com> wrote:
> > What is the best approach to tune queryResultCache ?For example the
> default
> > size is: size="512" but since a document id is just an int (it is an
> int,
> > right?) ,i.e 4 bytes why not set size to 10,000,000 for example (it's
> only
> > ~38Mb).
>
> This cash size refers to the number of id lists are stored.
> One query + sort that yields the top 20 results == 1 entry in the cache.
>
> -Yonik
>
Re: queryResultCache
Posted by Yonik Seeley <yo...@apache.org>.
On Jan 6, 2008 12:59 AM, s d <s....@gmail.com> wrote:
> What is the best approach to tune queryResultCache ?For example the default
> size is: size="512" but since a document id is just an int (it is an int,
> right?) ,i.e 4 bytes why not set size to 10,000,000 for example (it's only
> ~38Mb).
This cash size refers to the number of id lists are stored.
One query + sort that yields the top 20 results == 1 entry in the cache.
-Yonik