: For e.g. - Current FQ - : fq: planName:all_features OR zipCode:1234 (in this case entire FQ is cached) : : I don't want to cache the entire FQ given it's very unique , but I : want to cache the first part (plan_name:all_features) to improve : performance . How do I achieve this? : : : My understanding is the following should work? Is this correct? : : fq: {!cache=false}(filter(planName:all_features) OR zipCode:1234)
Correct. In small scale testing you can see it work by looking at your cache metrics -- I've included a `bin/solr -e techproducts` example below my sig... -Hoss http://www.lucidworks.com/ hossman@slate:~$ curl -sS 'http://localhost:8983/solr/admin/metrics?omitHeader=true&key=solr.core.techproducts:CACHE.searcher.filterCache' { "metrics":{ "solr.core.techproducts:CACHE.searcher.filterCache":{ "lookups":0, "hits":0, "hitratio":1.0, "inserts":0, "evictions":0, "size":0, "warmupTime":0, "ramBytesUsed":448, "maxRamMB":-1, "cumulative_lookups":0, "cumulative_hits":0, "cumulative_hitratio":1.0, "cumulative_inserts":0, "cumulative_evictions":0}}} hossman@slate:~$ curl --globoff -sS 'http://localhost:8983/solr/techproducts/select?q=*:*&rows=0&omitHeader=true&fq={!cache=false}(filter(inStock:true)+OR+id:IW-02)' { "response":{"numFound":18,"start":0,"numFoundExact":true,"docs":[] }} hossman@slate:~$ curl -sS 'http://localhost:8983/solr/admin/metrics?omitHeader=true&key=solr.core.techproducts:CACHE.searcher.filterCache' { "metrics":{ "solr.core.techproducts:CACHE.searcher.filterCache":{ "lookups":1, "hits":0, "hitratio":0.0, "inserts":1, "evictions":0, "size":1, "warmupTime":0, "ramBytesUsed":1744, "maxRamMB":-1, "cumulative_lookups":1, "cumulative_hits":0, "cumulative_hitratio":0.0, "cumulative_inserts":1, "cumulative_evictions":0}}} hossman@slate:~$ curl --globoff -sS 'http://localhost:8983/solr/techproducts/select?q=*:*&rows=0&omitHeader=true&fq={!cache=false}(filter(inStock:true)+OR+id:GB18030TEST)' { "response":{"numFound":17,"start":0,"numFoundExact":true,"docs":[] }} hossman@slate:~$ curl -sS 'http://localhost:8983/solr/admin/metrics?omitHeader=true&key=solr.core.techproducts:CACHE.searcher.filterCache' { "metrics":{ "solr.core.techproducts:CACHE.searcher.filterCache":{ "lookups":2, "hits":1, "hitratio":0.5, "inserts":1, "evictions":0, "size":1, "warmupTime":0, "ramBytesUsed":1744, "maxRamMB":-1, "cumulative_lookups":2, "cumulative_hits":1, "cumulative_hitratio":0.5, "cumulative_inserts":1, "cumulative_evictions":0}}}