0
votes

I have a general question on how the flow happens in faceted search..

1.Assume that I issue a faceted query search as given below -

 /solr/query?q=camera
      &facet=on
      &facet.field=manu
      &facet.field=camera_type
      &facet.query=price:[* TO 100]
      &facet.query=price:[100 TO 200]
      &facet.query=[price:200 TO 300]
      &facet.query=price:[300 TO 400]
      &facet.query=[price:400 TO 500]
      &facet.query=price:[500 TO *]

2.Now, I want to filter the results based on the below query...

/solr/query?q=camera
  &facet=on&facet.field=manu&facet.field=camera_type
  &fq=price:[400 to 500]

Everything works well. ie; the last query is executed based on the results of the first query..

What will happen in the following case?

  1. When I run a simple "select all" query -

    /solr/collection1/select?q=%3A%0A&wt=json&indent=true&facet=true

  2. And then run a filter on the faceted query -

    /solr/query?q=camera &facet=on&facet.field=manu &fq=price:[400 to 500] &fq=camera_type:SLR

Will the 'select all' will break the cached query? So, the next faceted query(camera_type:SLR) won't able to run against the filter cache?

1

1 Answers

0
votes

No, the select all will not break your filterCache.

filterCache will store your filter queries, and you can set how many items you want to store in your filterCache using "size" attribute.

In your example above, your filter queries will be cached, and they will be removed based on your cache size and cache implementations, which can be LRUCache, FastLRUCache or LFUCache.

Please see this for details: https://wiki.apache.org/solr/SolrCaching#filterCache