Hello, See filter() in http://yonik.com/solr-5-4/ also http://blog.griddynamics.com/2014/01/segmented-filter-cache-in-solr.html
On Tue, Sep 15, 2015 at 10:35 PM, Sanders, Marshall (AT - Atlanta) < marshall.sand...@autotrader.com> wrote: > Greetings, > > We've successfully figured out how to tune AND queries to make effective > use (re-use) of the filter cache, is there a way to do this with OR queries > as well? The way our data is structured I feel we could really benefit > from it. For example with AND queries instead of doing fq=field1:value1 > AND field2:value2 we split them into fq=field1:value1&fq=field2:value2 > which will generate 2 separate cache entries which can then be used by any > subsequent queries which use either one, or both, or any combination with > other fields/values as long as the same format is followed. > > My question is regarding if there is a way to structure/configure an OR > query where it would do something similar. > > Currently if you have > fq=field1:value1 OR field2:value2 > > It generates a filter cache item with a key like this: > item_field1:value1 field2 > > Ideally it would create 2 additional ones like so (configured or on demand > maybe?): > item_field1:value1 field2:value2 > item_field1:value1 > item_field2:value2 > > That way we can reuse existing cache keys that might be in the cache > already and/or set up the cache for future queries. > > Is there a way to specify/reformat the fq parameter to accomplish > something along these lines? > > > Marshall Sanders > Technical Lead - Software Engineer > Autotrader.com > 404-568-7130 > > -- Sincerely yours Mikhail Khludnev Principal Engineer, Grid Dynamics <http://www.griddynamics.com> <mkhlud...@griddynamics.com>