Re: Why does faceting add an entry to the filter cache for the q parameter?

2022-11-18 Thread Andy Lester
> I do think that the docs filterCache refguide [1] could be updated to > be more explicit about all the possible cases that use the > filterCache, and I'd be happy to help with that. Thanks, I appreciate it. If you would, please make yourself a watcher on the ticket I started for the task:

Re: Why does faceting add an entry to the filter cache for the q parameter?

2022-11-18 Thread Andy Lester
> On Nov 17, 2022, at 12:56 PM, Mikhail Khludnev wrote: > > Overall, FacetComponent explicitly requires docset > > I don't recommend changing anything in this flow. And if that's how it should be, that's fine. We just need to add notes about this in the docs for filterCache. I'll be doing

Re: Why does faceting add an entry to the filter cache for the q parameter?

2022-11-18 Thread Michael Gibney
Given that the filters being cached are useful across all these contexts, and that facet values are often subsequently applied as filters, I don't think it'd make sense to separate these two -- especially not without some way to have both aware of each other to avoid duplicating effort. It might

Re: Why does faceting add an entry to the filter cache for the q parameter?

2022-11-17 Thread Mikhail Khludnev
> whether DocList can even be used for facets, No way. For sure. Overall, FacetComponent explicitly requires docset https://github.com/apache/solr/blob/main/solr/core/src/java/org/apache/solr/handler/component/FacetComponent.java#L82 and then

Re: Why does faceting add an entry to the filter cache for the q parameter?

2022-11-17 Thread Shawn Heisey
On 11/17/22 08:45, Andy Lester wrote: Short of that, wouldn't it make sense for facets to put the q in the queryResultsCache, not the filterCache? The queryResultCache is defined as ... very different from the that filterCache uses.  I have no idea whether DocList can even be used for

Re: Why does faceting add an entry to the filter cache for the q parameter?

2022-11-17 Thread Andy Lester
> I think it likely means that the intended benefit of filterCache, which is > the caching of fqs, is not happening because those cache entries will be > evicted almost as soon as they are created. Yes, that's what I suspect is happening. Another problem with having q in the filterCache is

Re: Why does faceting add an entry to the filter cache for the q parameter?

2022-11-17 Thread Shawn Heisey
On 11/16/22 13:21, Mikhail Khludnev wrote: Why do you think that thousands of evictions is a bad thing? I think it likely means that the intended benefit of filterCache, which is the caching of fqs, is not happening because those cache entries will be evicted almost as soon as they are

Re: Why does faceting add an entry to the filter cache for the q parameter?

2022-11-16 Thread Andy Lester
> It seems reasonable to me. To count facets Solr needs docsets of results > for in-order processing. > I suppose, SimpleFacets code can be amended so it keeps the result docset > out of filter cache, but would it get significant gain? Mostly I think this is about expectations, and perhaps this

Re: Why does faceting add an entry to the filter cache for the q parameter?

2022-11-16 Thread Mikhail Khludnev
Hi, Andy. It seems reasonable to me. To count facets Solr needs docsets of results for in-order processing. I suppose, SimpleFacets code can be amended so it keeps the result docset out of filter cache, but would it get significant gain? Why do you think that thousands of evictions is a bad thing?

Why does faceting add an entry to the filter cache for the q parameter?

2022-11-16 Thread Andy Lester
I've been working on tuning my filter cache, and have discovered that doing a search with facet=on results in an entry in the filter cache for the q parameter. This makes no sense to me. Is this intentional? In my app, there are only a couple of dozen possible FQs that can get passed to Solr.