Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-14939

JSON facets: range faceting to support cache=false parameter

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 8.8, 9.0
    • None
    • None

    Description

      The cache parameter, if set to false, is intended to support non-caching of the search results: https://lucene.apache.org/solr/guide/8_6/common-query-parameters.html#cache-parameter

      Based on inspection of

      curl "http://localhost:8983/solr/admin/metrics?prefix=CACHE.searcher.filterCache" 
      

      metrics before and after a search we can see that range JSON facet queries currently do not support a cache=false parameter.

      Using the techproducts example collection as an illustration, if a 1 MONTH gap value is used then 12 filterCache entries are added for a one year start/end time range.

      curl "http://localhost:8983/solr/techproducts/query?q=*:*&rows=0&cache=false" -d 'json.facet={
        manufacturedate_dt_ranges : {
          type : range,
          field : manufacturedate_dt,
          mincount : 1,
          gap : "%2B1MONTH",
          start : "2005-01-01T00:00:00.000Z",
          end   : "2005-12-31T23:59:59.999Z",
        }
      }'
      

      Similarly, if a 1 DAY gap value is used then 365 filterCache entries are added for a one year start/end time range and if a 1 HOUR gap value were to be used that would equate to 365 x 24 = 8,760 entries. This means that a single search potentially displaces many or all existing filterCache entries.

      This ticket proposes to support the cache parameter for JSON range facet queries:

      • the current and default behaviour would remain cache=true and
      • via cache=false users would be able run an 'uncommon' search with many range buckets without impact on the 'common' searches with fewer range buckets.

      Attachments

        Issue Links

          Activity

            People

              cpoerschke Christine Poerschke
              cpoerschke Christine Poerschke
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h