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

Fold Interval Faceting into Range Faceting

    XMLWordPrintableJSON

Details

    • Task
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • 5.5, 6.0
    • None
    • None

    Description

      Now that range faceting supports a "filter" and a "dv" method, and that interval faceting is supported on fields with docValues=false, I think we should make it so that interval faceting is just a different way of specifying ranges in range faceting, allowing users to indicate specific ranges.
      I propose we use the same syntax for intervals, but under the "range" parameter family:

      facet.range=price&
      f.price.facet.range.set=[0,10]&
      f.price.facet.range.set=(10,100]
      

      The counts for those ranges would come in the response also inside of the "range_facets" section. I'm not sure if it's better to include the ranges in the "counts" section, or in a different section (intervals?sets?buckets?). I'm open to suggestions.

      "facet_ranges":{
            "price":{
              "counts":[
                "[0,10]",3,
                "(10,100]",2]
             }
      }
      

      or…

      "facet_ranges":{
            "price":{
              "intervals":[
                "[0,10]",3,
                "(10,100]",2]
             }
      }
      

      We should support people specifying both things on the same field.
      Once this is done, "interval faceting" could be deprecated, as all it's functionality is now possible through range queries.

      Attachments

        1. SOLR-7795.patch
          66 kB
          Tomas Eduardo Fernandez Lobbe
        2. SOLR-7795.patch
          75 kB
          Tomas Eduardo Fernandez Lobbe
        3. SOLR-7795.patch
          106 kB
          Tomas Eduardo Fernandez Lobbe
        4. SOLR-7795.patch
          112 kB
          Tomas Eduardo Fernandez Lobbe
        5. SOLR-7795.patch
          114 kB
          Tomas Eduardo Fernandez Lobbe
        6. SOLR-7795.patch
          116 kB
          Tomas Eduardo Fernandez Lobbe

        Issue Links

          Activity

            People

              Unassigned Unassigned
              tflobbe Tomas Eduardo Fernandez Lobbe
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: