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 Markus Jelsma <ma...@openindex.io> on 2013/02/14 13:18:08 UTC
get filterCache in Component
Hi,
We need to get the filterCache in a Component but SolrIndexSearcher.getCache(String name) does not return it. It seems the filterCache is not added to cacheMap and can therefore not be returned.
SolrCache<Query,DocSet> filterCache = rb.req.getSearcher().getCache("filterCache");
Will always return null. Can we get the filterCache via other means or should it be added to the cacheMap so getCache can return it?
Thanks,
Markus
RE: get filterCache in Component
Posted by Chris Hostetter <ho...@fucit.org>.
: I need to get the filterCache for SOLR-4280. I can create a new issue
: patching SolrIndexSearcher and adding the missing caches (non-user
: caches) to the cacheMap so they can be returned using getCache(String)
: but i'm not sure this is intented. It does work but is this the right
: path?
I'm not sure why the filterCache isn't more directly "gettable" so feel
free to open an issue if you think it should be, but i don't think adding
that needs to block SOLR-4280 -- cand you just call
SolrIndexSearcher.getDocSet(...) to get the information you need?
-Hoss
RE: get filterCache in Component
Posted by Markus Jelsma <ma...@openindex.io>.
Chris, Mihhail,
I'd like to avoid issueing a query and spare the cycles. In SOLR-4280 i only look for the smallest DocSet by iterating over them. I would tend to think it's cheaper than getDocSet() and perhaps cacheDocSet().
In case i would add non-usercaches to the cacheMap and create a separate issue for that, would that break things? Be really bad?
Thanks,
Markus
-----Original message-----
> From:Mikhail Khludnev <mk...@griddynamics.com>
> Sent: Fri 15-Feb-2013 21:17
> To: solr-user <so...@lucene.apache.org>
> Subject: Re: get filterCache in Component
>
> Markus,
>
> I wonder why you need an access to it. I've thought that current searcher's
> methods (getDocSet(), cacheDocSet() ) are enough to do everything. Anyway,
> if you wish, I just looked in code and see that it's available via
> core.getInfoRegistry().get("filterCache"), it can lead to some problems,
> but should work.
>
>
> On Fri, Feb 15, 2013 at 4:30 PM, Markus Jelsma
> <ma...@openindex.io>wrote:
>
> > Hi,
> >
> > I need to get the filterCache for SOLR-4280. I can create a new issue
> > patching SolrIndexSearcher and adding the missing caches (non-user caches)
> > to the cacheMap so they can be returned using getCache(String) but i'm not
> > sure this is intented. It does work but is this the right path?
> >
> > https://issues.apache.org/jira/browse/SOLR-4280
> >
> > Thanks,
> > Markus
> >
> >
> > -----Original message-----
> > > From:Markus Jelsma <ma...@openindex.io>
> > > Sent: Thu 14-Feb-2013 13:18
> > > To: solr-user@lucene.apache.org
> > > Subject: get filterCache in Component
> > >
> > > Hi,
> > >
> > > We need to get the filterCache in a Component but
> > SolrIndexSearcher.getCache(String name) does not return it. It seems the
> > filterCache is not added to cacheMap and can therefore not be returned.
> > >
> > > SolrCache<Query,DocSet> filterCache =
> > rb.req.getSearcher().getCache("filterCache");
> > >
> > > Will always return null. Can we get the filterCache via other means or
> > should it be added to the cacheMap so getCache can return it?
> > >
> > > Thanks,
> > > Markus
> > >
> >
>
>
>
> --
> Sincerely yours
> Mikhail Khludnev
> Principal Engineer,
> Grid Dynamics
>
> <http://www.griddynamics.com>
> <mk...@griddynamics.com>
>
Re: get filterCache in Component
Posted by Mikhail Khludnev <mk...@griddynamics.com>.
Markus,
I wonder why you need an access to it. I've thought that current searcher's
methods (getDocSet(), cacheDocSet() ) are enough to do everything. Anyway,
if you wish, I just looked in code and see that it's available via
core.getInfoRegistry().get("filterCache"), it can lead to some problems,
but should work.
On Fri, Feb 15, 2013 at 4:30 PM, Markus Jelsma
<ma...@openindex.io>wrote:
> Hi,
>
> I need to get the filterCache for SOLR-4280. I can create a new issue
> patching SolrIndexSearcher and adding the missing caches (non-user caches)
> to the cacheMap so they can be returned using getCache(String) but i'm not
> sure this is intented. It does work but is this the right path?
>
> https://issues.apache.org/jira/browse/SOLR-4280
>
> Thanks,
> Markus
>
>
> -----Original message-----
> > From:Markus Jelsma <ma...@openindex.io>
> > Sent: Thu 14-Feb-2013 13:18
> > To: solr-user@lucene.apache.org
> > Subject: get filterCache in Component
> >
> > Hi,
> >
> > We need to get the filterCache in a Component but
> SolrIndexSearcher.getCache(String name) does not return it. It seems the
> filterCache is not added to cacheMap and can therefore not be returned.
> >
> > SolrCache<Query,DocSet> filterCache =
> rb.req.getSearcher().getCache("filterCache");
> >
> > Will always return null. Can we get the filterCache via other means or
> should it be added to the cacheMap so getCache can return it?
> >
> > Thanks,
> > Markus
> >
>
--
Sincerely yours
Mikhail Khludnev
Principal Engineer,
Grid Dynamics
<http://www.griddynamics.com>
<mk...@griddynamics.com>
RE: get filterCache in Component
Posted by Markus Jelsma <ma...@openindex.io>.
Hi,
I need to get the filterCache for SOLR-4280. I can create a new issue patching SolrIndexSearcher and adding the missing caches (non-user caches) to the cacheMap so they can be returned using getCache(String) but i'm not sure this is intented. It does work but is this the right path?
https://issues.apache.org/jira/browse/SOLR-4280
Thanks,
Markus
-----Original message-----
> From:Markus Jelsma <ma...@openindex.io>
> Sent: Thu 14-Feb-2013 13:18
> To: solr-user@lucene.apache.org
> Subject: get filterCache in Component
>
> Hi,
>
> We need to get the filterCache in a Component but SolrIndexSearcher.getCache(String name) does not return it. It seems the filterCache is not added to cacheMap and can therefore not be returned.
>
> SolrCache<Query,DocSet> filterCache = rb.req.getSearcher().getCache("filterCache");
>
> Will always return null. Can we get the filterCache via other means or should it be added to the cacheMap so getCache can return it?
>
> Thanks,
> Markus
>