lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sanders, Marshall (AT - Atlanta)" <Marshall.Sand...@autotrader.com>
Subject FilterCache Tuning Question
Date Tue, 15 Sep 2015 19:35:06 GMT
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


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message