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

JSON "range" facets can incorrectly refine subfacets for buckets

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.5, 8.0
    • Component/s: Facet Module
    • Labels:
      None

      Description

      while simple type:range facets don't benefit from refinement, because every shard returns the same set of buckets, some bugs currently exist when a range facet contains sub facets that use refinement:

      1. the optional other buckets (before/after/between) are not considered during refinement
      2. when using the include option: if edge is specified, then the refinement of all range buckets mistakenly includes the lower bound of the range, regardless of whether lower was specified.

      #1 occurs because FacetRangeMerger extends FacetRequestSortedMerger<FacetRange> ... however FacetRangeMerger does not override getRefinement(...) which means only FacetRequestSortedMerger.buckets is evaluated and considered for refinement. The additional, special purpose, FacetBucket instances tracked in FacetRangeMerger are never considered for refinement.

      #2 exists because of a mistaken in the implementation of refineBucket and how it computes the start value.

        Attachments

        1. SOLR-12516.patch
          2 kB
          Hoss Man
        2. SOLR-12516.patch
          39 kB
          Hoss Man
        3. SOLR-12516.patch
          65 kB
          Hoss Man
        4. SOLR-12516.patch
          64 kB
          Hoss Man
        5. SOLR-12516.patch
          70 kB
          Hoss Man
        6. SOLR-12516.patch
          83 kB
          Hoss Man
        7. SOLR-12516.patch
          83 kB
          Hoss Man

          Issue Links

            Activity

              People

              • Assignee:
                hossman Hoss Man
                Reporter:
                hossman Hoss Man
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: