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 Ryan McKinley <ry...@gmail.com> on 2007/04/05 01:28:40 UTC

Access filterCache/queryResultCache/documentCache

Is there / should there be a way to access the three core caches?

You can access user defined caches from:
  searcher.getCache( "name" );

The three core caches only have private access from SolrIndexSearcher.

I want to be able to programmatic check the cache sizes and make sure
they are big enough for faceting.

thanks
ryan

Re: Access filterCache/queryResultCache/documentCache

Posted by Ryan McKinley <ry...@gmail.com>.
I just looked into it more... for the case I'm looking at, getSize()
does not help because it returns how many elements are in the cache,
not the max size.

I can get what I need with:
  SolrConfig.config.getInt( "query/filterCache/@size", -1 );

so lets put off adding getters to SolrIndexSearcher until there is a need...


On 4/4/07, Mike Klaas <mi...@gmail.com> wrote:
> On 4/4/07, Erik Hatcher <er...@ehatchersolutions.com> wrote:
> >
> > On Apr 4, 2007, at 7:28 PM, Ryan McKinley wrote:
> > > Is there / should there be a way to access the three core caches?
> >
> >    there should.  +1
> >
> > > I want to be able to programmatic check the cache sizes and make sure
> > > they are big enough for faceting.
> >
> > i could use the same thing!
>
> It would also be useful to (for instance) insert a filter into the
> filter cache that could be subsequently used by a query.  Obviously,
> this is really only useful for filters that aren't constructed from a
> query -> docset.
>
> -Mike
>

Re: Access filterCache/queryResultCache/documentCache

Posted by Mike Klaas <mi...@gmail.com>.
On 4/4/07, Erik Hatcher <er...@ehatchersolutions.com> wrote:
>
> On Apr 4, 2007, at 7:28 PM, Ryan McKinley wrote:
> > Is there / should there be a way to access the three core caches?
>
>    there should.  +1
>
> > I want to be able to programmatic check the cache sizes and make sure
> > they are big enough for faceting.
>
> i could use the same thing!

It would also be useful to (for instance) insert a filter into the
filter cache that could be subsequently used by a query.  Obviously,
this is really only useful for filters that aren't constructed from a
query -> docset.

-Mike

Re: Access filterCache/queryResultCache/documentCache

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Apr 4, 2007, at 7:28 PM, Ryan McKinley wrote:
> Is there / should there be a way to access the three core caches?

   there should.  +1

> I want to be able to programmatic check the cache sizes and make sure
> they are big enough for faceting.

i could use the same thing!

	Erik