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 Otis Gospodnetic <ot...@gmail.com> on 2013/11/20 04:04:59 UTC

{!cache=false} for regular queries?

Hi,

We have the ability to turn off caching for filter queries -
http://wiki.apache.org/solr/CommonQueryParameters#Caching_of_filters

I didn't try it, but I think one can't turn off caching for regular
queries, a la:

q={!cache=false}<query here>

Is there a reason this could not be done?

Thanks,
Otis
--
Performance Monitoring * Log Analytics * Search Analytics
Solr & Elasticsearch Support * http://sematext.com/

Re: {!cache=false} for regular queries?

Posted by Erick Erickson <er...@gmail.com>.
Mikhail:

Interesting point! Thanks! I haven't looked at the implementation enough to
know, but it looks like these are unrelated? You'd have to happen to have a
fq clause you'd already submitted (and cached) for this to happen?

But like I said, I don't know the code. I didn't realize this even happened
BTW, so I'm glad you pointed it out!

Erick


On Wed, Nov 20, 2013 at 8:02 AM, Mikhail Khludnev <
mkhludnev@griddynamics.com> wrote:

> Eric,
>
> it's worth to mention that queries which sorts by field can potentially
> blows filter cache
> http://wiki.apache.org/solr/SolrCaching#useFilterForSortedQuery here is
> the
> hint might work out.
>
>
> On Wed, Nov 20, 2013 at 4:30 PM, Erick Erickson <erickerickson@gmail.com
> >wrote:
>
> > But I don't know whether it's worth worrying about. queryResultCache is
> > pretty small.
> >
> > I think of it as a map where the key is the text of the query and the
> value
> > is an
> > int[queryWindowSize]. So bypassing the cache is probably not going to
> make
> > much
> > difference.
> >
> > YMMV of course.
> >
> > Best
> > Erick
> >
> >
> > On Wed, Nov 20, 2013 at 12:44 AM, Mikhail Khludnev <
> > mkhludnev@griddynamics.com> wrote:
> >
> > > It should bypass cache for sure
> > >
> > >
> >
> https://github.com/apache/lucene-solr/blob/34a92d090ac4ff5c8382e1439827d678265ede0d/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java#L1263
> > > 20.11.2013 7:05 пользователь "Otis Gospodnetic" <
> > > otis.gospodnetic@gmail.com>
> > > написал:
> > >
> > > > Hi,
> > > >
> > > > We have the ability to turn off caching for filter queries -
> > > > http://wiki.apache.org/solr/CommonQueryParameters#Caching_of_filters
> > > >
> > > > I didn't try it, but I think one can't turn off caching for regular
> > > > queries, a la:
> > > >
> > > > q={!cache=false}<query here>
> > > >
> > > > Is there a reason this could not be done?
> > > >
> > > > Thanks,
> > > > Otis
> > > > --
> > > > Performance Monitoring * Log Analytics * Search Analytics
> > > > Solr & Elasticsearch Support * http://sematext.com/
> > > >
> > >
> >
>
>
>
> --
> Sincerely yours
> Mikhail Khludnev
> Principal Engineer,
> Grid Dynamics
>
> <http://www.griddynamics.com>
>  <mk...@griddynamics.com>
>

Re: {!cache=false} for regular queries?

Posted by Mikhail Khludnev <mk...@griddynamics.com>.
Eric,

it's worth to mention that queries which sorts by field can potentially
blows filter cache
http://wiki.apache.org/solr/SolrCaching#useFilterForSortedQuery here is the
hint might work out.


On Wed, Nov 20, 2013 at 4:30 PM, Erick Erickson <er...@gmail.com>wrote:

> But I don't know whether it's worth worrying about. queryResultCache is
> pretty small.
>
> I think of it as a map where the key is the text of the query and the value
> is an
> int[queryWindowSize]. So bypassing the cache is probably not going to make
> much
> difference.
>
> YMMV of course.
>
> Best
> Erick
>
>
> On Wed, Nov 20, 2013 at 12:44 AM, Mikhail Khludnev <
> mkhludnev@griddynamics.com> wrote:
>
> > It should bypass cache for sure
> >
> >
> https://github.com/apache/lucene-solr/blob/34a92d090ac4ff5c8382e1439827d678265ede0d/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java#L1263
> > 20.11.2013 7:05 пользователь "Otis Gospodnetic" <
> > otis.gospodnetic@gmail.com>
> > написал:
> >
> > > Hi,
> > >
> > > We have the ability to turn off caching for filter queries -
> > > http://wiki.apache.org/solr/CommonQueryParameters#Caching_of_filters
> > >
> > > I didn't try it, but I think one can't turn off caching for regular
> > > queries, a la:
> > >
> > > q={!cache=false}<query here>
> > >
> > > Is there a reason this could not be done?
> > >
> > > Thanks,
> > > Otis
> > > --
> > > Performance Monitoring * Log Analytics * Search Analytics
> > > Solr & Elasticsearch Support * http://sematext.com/
> > >
> >
>



-- 
Sincerely yours
Mikhail Khludnev
Principal Engineer,
Grid Dynamics

<http://www.griddynamics.com>
 <mk...@griddynamics.com>

Re: {!cache=false} for regular queries?

Posted by Erick Erickson <er...@gmail.com>.
But I don't know whether it's worth worrying about. queryResultCache is
pretty small.

I think of it as a map where the key is the text of the query and the value
is an
int[queryWindowSize]. So bypassing the cache is probably not going to make
much
difference.

YMMV of course.

Best
Erick


On Wed, Nov 20, 2013 at 12:44 AM, Mikhail Khludnev <
mkhludnev@griddynamics.com> wrote:

> It should bypass cache for sure
>
> https://github.com/apache/lucene-solr/blob/34a92d090ac4ff5c8382e1439827d678265ede0d/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java#L1263
> 20.11.2013 7:05 пользователь "Otis Gospodnetic" <
> otis.gospodnetic@gmail.com>
> написал:
>
> > Hi,
> >
> > We have the ability to turn off caching for filter queries -
> > http://wiki.apache.org/solr/CommonQueryParameters#Caching_of_filters
> >
> > I didn't try it, but I think one can't turn off caching for regular
> > queries, a la:
> >
> > q={!cache=false}<query here>
> >
> > Is there a reason this could not be done?
> >
> > Thanks,
> > Otis
> > --
> > Performance Monitoring * Log Analytics * Search Analytics
> > Solr & Elasticsearch Support * http://sematext.com/
> >
>

Re: {!cache=false} for regular queries?

Posted by Mikhail Khludnev <mk...@griddynamics.com>.
It should bypass cache for sure
https://github.com/apache/lucene-solr/blob/34a92d090ac4ff5c8382e1439827d678265ede0d/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java#L1263
20.11.2013 7:05 пользователь "Otis Gospodnetic" <ot...@gmail.com>
написал:

> Hi,
>
> We have the ability to turn off caching for filter queries -
> http://wiki.apache.org/solr/CommonQueryParameters#Caching_of_filters
>
> I didn't try it, but I think one can't turn off caching for regular
> queries, a la:
>
> q={!cache=false}<query here>
>
> Is there a reason this could not be done?
>
> Thanks,
> Otis
> --
> Performance Monitoring * Log Analytics * Search Analytics
> Solr & Elasticsearch Support * http://sematext.com/
>