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

Better faceting for multiple intervals on DV fields

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 4.10
    • None
    • None

    Description

      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

      Attachments

        1. FacetTester.java
          4 kB
          Tomas Eduardo Fernandez Lobbe
        2. SOLR-6216.patch
          103 kB
          Erick Erickson
        3. SOLR-6216.patch
          103 kB
          Tomas Eduardo Fernandez Lobbe
        4. SOLR-6216.patch
          101 kB
          Tomas Eduardo Fernandez Lobbe
        5. SOLR-6216.patch
          96 kB
          Erick Erickson
        6. SOLR-6216.patch
          89 kB
          Tomas Eduardo Fernandez Lobbe
        7. SOLR-6216.patch
          93 kB
          Tomas Eduardo Fernandez Lobbe
        8. SOLR-6216.patch
          98 kB
          Tomas Eduardo Fernandez Lobbe
        9. SOLR-6216.patch
          87 kB
          Tomas Eduardo Fernandez Lobbe
        10. SOLR-6216.patch
          73 kB
          Tomas Eduardo Fernandez Lobbe
        11. SOLR-6216.patch
          73 kB
          Tomas Eduardo Fernandez Lobbe

        Issue Links

          Activity

            People

              erickerickson Erick Erickson
              tflobbe Tomas Eduardo Fernandez Lobbe
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: