Filterqueries -- all in one or multiple?

Filterqueries can be written in two of the following ways:

fq=aaa:bbb AND ccc:ddd AND eee:fff



Which way is better?

Well, if you are going to get reuse out of the first one because all of your queries are like this, you are going to keep a smaller amount of records in the cache than the second way which will have three different cache entries all with a larger number of records.


The first one is much less likely to get reused because it has three different terms. This is a good way to keep a bunch of filter queries in your cache and get no reuse out of your cache. Also because you have so many more combinations of filterqueries which can be made this way you are probably going to have a lot more records in your cache than just by keeping a cache entry for each filter. So it depends on your queries, but probably you will want to use the second method. 

Make sure and pay attention to your cache statistics. A low hit ratio and high evictions are evidence that your caches and queries could use some tweaking.

Have more questions? Submit a request


Please sign in to leave a comment.
Powered by Zendesk