On 5/5/2016 2:44 PM, Jay Potharaju wrote: > Are you suggesting rewriting it like this ? > fq=filter(fromfield:[* TO NOW/DAY+1DAY]&& tofield:[NOW/DAY-7DAY TO *] ) > fq=filter(type:abc) > > Is this a better use of the cache as supposed to fq=fromfield:[* TO > NOW/DAY+1DAY]&& tofield:[NOW/DAY-7DAY TO *] && type:"abc"
I keep writing emails and forgetting to send them. Supplementing the excellent information you've already gotten: Because all three clauses are ANDed together, what I would suggest doing is three filter queries: fq=fromfield:[* TO NOW/DAY+1DAY] fq=tofield:[NOW/DAY-7DAY TO *] fq=type:abc Whether or not to split your fq like this will depend on how you use filters, and how much memory you can let them use. With three separate fq parameters, you'll get three cache entries in filterCache from the one query. If the next query changes only one of those filters to something that's not in the cache yet, but leaves the other two alone, then Solr can get the results from the cache for two of them, and then will only need to run the query for one of them, saving time and system resources. I removed the quotes from "abc" because for that specific example, quotes are not necessary. For more complex information than abc, quotes might be important. Experiment, and use what gets you the results you want. Thanks, Shawn