As mentioned above adding filter() will add the filter query to the cache. This would mean that results are fetched from cache instead of running n number of filter queries in parallel. Is it necessary to use the filter() option? I was under the impression that all filter queries will get added to the "filtercache". What is the advantage of using filter()?
*From doc: https://cwiki.apache.org/confluence/display/solr/Query+Settings+in+SolrConfig <https://cwiki.apache.org/confluence/display/solr/Query+Settings+in+SolrConfig>* This cache is used by SolrIndexSearcher for filters (DocSets) for unordered sets of all documents that match a query. The numeric attributes control the number of entries in the cache. Solr uses the filterCache to cache results of queries that use the fq search parameter. Subsequent queries using the same parameter setting result in cache hits and rapid returns of results. See Searching for a detailed discussion of the fq parameter. *From Yonik's site: http://yonik.com/solr/query-syntax/#FilterQuery <http://yonik.com/solr/query-syntax/#FilterQuery>* (Since Solr 5.4) A filter query retrieves a set of documents matching a query from the filter cache. Since scores are not cached, all documents that match the filter produce the same score (0 by default). Cached filters will be extremely fast when they are used again in another query. Thanks On Fri, May 6, 2016 at 9:46 AM, Jay Potharaju <jspothar...@gmail.com> wrote: > We have high query load and considering that I think the suggestions made > above will help with performance. > Thanks > Jay > > On Fri, May 6, 2016 at 7:26 AM, Shawn Heisey <apa...@elyograg.org> wrote: > >> On 5/6/2016 7:19 AM, Shawn Heisey wrote: >> > With three separate >> > fq parameters, you'll get three cache entries in filterCache from the >> > one query. >> >> One more tidbit of information related to this: >> >> When you have multiple filters and they aren't cached, I am reasonably >> certain that they run in parallel. Instead of one complex filter, you >> would have three simple filters running simultaneously. For low to >> medium query loads on a server with a whole bunch of CPUs, where there >> is plenty of spare CPU power, this can be a real gain in performance ... >> but if the query load is really high, it might be a bad thing. >> >> Thanks, >> Shawn >> >> > > > -- > Thanks > Jay Potharaju > > -- Thanks Jay Potharaju