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

Better faceting for multiple intervals on DV fields


    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.10
    • Component/s: None
    • Labels:


      There are two ways to have faceting on values ranges in Solr right now: “Range Faceting” and “Query Faceting” (doing range queries). They both end up doing something similar:

      searcher.numDocs(rangeQ , docs)

      The good thing about this implementation is that it can benefit from caching. The bad thing is that it may be slow with cold caches, and that there will be a query for each of the ranges.

      A different implementation would be one that works similar to regular field faceting, using doc values and validating ranges for each value of the matching documents. This implementation would sometimes be faster than Range Faceting / Query Faceting, specially on cases where caches are not very effective, like on a high update rate, or where ranges change frequently.

      Functionally, the result should be exactly the same as the one obtained by doing a facet query for every interval


        1. FacetTester.java
          4 kB
          Tomás Fernández Löbbe
        2. SOLR-6216.patch
          103 kB
          Erick Erickson
        3. SOLR-6216.patch
          103 kB
          Tomás Fernández Löbbe
        4. SOLR-6216.patch
          101 kB
          Tomás Fernández Löbbe
        5. SOLR-6216.patch
          96 kB
          Erick Erickson
        6. SOLR-6216.patch
          89 kB
          Tomás Fernández Löbbe
        7. SOLR-6216.patch
          93 kB
          Tomás Fernández Löbbe
        8. SOLR-6216.patch
          98 kB
          Tomás Fernández Löbbe
        9. SOLR-6216.patch
          87 kB
          Tomás Fernández Löbbe
        10. SOLR-6216.patch
          73 kB
          Tomás Fernández Löbbe
        11. SOLR-6216.patch
          73 kB
          Tomás Fernández Löbbe

          Issue Links



              • Assignee:
                erickerickson Erick Erickson
                tomasflobbe Tomás Fernández Löbbe
              • Votes:
                0 Vote for this issue
                6 Start watching this issue


                • Created: