It would be very helpful to be able to inspect the contents of the filterCache.
I'd like to be able to query something like
nentries would be allowed to be -1 to get everything.
It would be nice to see these data items for each entry. I don't know which are available, but I'm thinking blue sky here:
- cache key, exactly as stored
- Timestamp when the entry was inserted
- Whether the insertion of the entry evicted another entry, and if so which one
- Timestamp of when this entry was last hit
- Number of hits on this entry forever
- Number of hits on this entry over some time period
- Number of documents matched by the filter
- Number of bytes of memory used by the filter
These are the sorts of questions I'd like to be able answer:
- "I just did a query that I expect will have added a cache entry. Did it?"
- "Are my queries hitting existing cache entries?"
- "How big should I set my filterCache size? Should I limit it by number of entries or RAM usage?"
- "Which of my FQs are getting used the most? These are the ones I want in my firstSearcher queries." (I currently determine this by processing my old solr logs)
- "Which filters give me the most bang for the buck in terms of RAM usage?"
- "I have filter X and filter Y, but would it be beneficial if I made a filter X AND Y?"
- "Which FQs are used more at certain times of the day? (Assuming I take regular snapshots throughout the day)"
I imagine a response might look like:
"evictedKey": "agelevel:4 shippable:Y",
- split to
SOLR-16548 CaffeineCache seems to be not working in 9.0 and later