You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Christine Poerschke (Jira)" <ji...@apache.org> on 2022/11/16 18:46:00 UTC

[jira] [Commented] (SOLR-16546) Faceting puts an entry for each q into the filterCache

    [ https://issues.apache.org/jira/browse/SOLR-16546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17634971#comment-17634971 ] 

Christine Poerschke commented on SOLR-16546:
--------------------------------------------

SOLR-14939 sounds a little bit similar.

> Faceting puts an entry for each q into the filterCache 
> -------------------------------------------------------
>
>                 Key: SOLR-16546
>                 URL: https://issues.apache.org/jira/browse/SOLR-16546
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: faceting
>    Affects Versions: 9.0
>            Reporter: Andy Lester
>            Priority: Minor
>
> I noticed that I was getting far more entries in the filterCache than I was expecting. All my app's FQs are driven by the app itself. There are only a couple dozen FQs possible in our queries, but I'd be getting ~10K cache ejections every hour. That didn't make any sense.
> So I investigated and discovered that making a query using facets adds an entry to the filterCache. Here's my demonstration.
> The script show-results is this:
> {{curl -s "$URL/twit/admin/cache" | jq -S .queries
> curl -s "$URL/admin/metrics" | jq '.metrics."solr.core.twit"."CACHE.searcher.filterCache".inserts'
> }}
> The /admin/cache handler is Shawn Heisey's cache dumper he's working on in ticket 15859. 
> {{# Freshly started Solr. No cache entries.
> $ ./show-results
> {}
> 0
> # Query on "alpha" with facets on.
> $ curl -s $URL/twit/select?q=title:alpha&rows=0&facet=on&facet.field=grouping
> # Now there is a filter cache entry.
> $ ./show-results
> {
>   "title:alpha": 0
> }
> 1
> # Query on "beta" with facets on. "beta" shows up in the cache.
> $ curl -s $URL/twit/select?q=title:beta&rows=0&facet=on&facet.field=grouping
> $ ./show-results
> {
>   "title:alpha": 0,
>   "title:beta": 0
> }
> 2
> # Now query on "gamma" with facets OFF.
> $ curl -s $URL/twit/select?q=title:gamma&rows=0&facet=off&facet.field=grouping
> # The "gamma" does not show up in the filter cache.
> $ ./show-results
> {
>   "title:alpha": 0,
>   "title:beta": 0
> }
> 2
> # Now do same query on "gamma" with facets ON.
> $ curl -s $URL/twit/select?q=title:gamma&rows=0&facet=on&facet.field=grouping
> # The "gamma" shows up.
> $ ./show-results
> {
>   "title:alpha": 0,
>   "title:beta": 0,
>   "title:gamma": 0
> }
> 3
> }}
> Is this correct behavior? Do I need to adjust my filterCache to allow for this?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org