Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-10070

"count all" faceting functionality counts deleted docs for multiple implementations

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 9.0, 8.11
    • modules/facet
    • None
    • New

    Description

      A few different Facets implementations supporting a "count all" style constructor that allows the user to not pass in a FacetsCollector instance. It advertises that it's equivalent to using a FacetsCollector populated with a MatchAllDocsQuery, but more efficient. It looks like, with the exception of FastTaxonomyFacetCounts, none of the implementations correctly account for deleted documents (have a look at FastTaxonomyFacetCounts for a correct example that consults "live docs."

      From what I can tell, the affected implementations are:

      • SortedSetDocValueFacetCounts
      • ConcurrentSortedSetDocValueFacetCounts
      • LongValueFacetCounts
      • StringValueFacetCounts

      I'll attach a PR shortly illustrating unit tests I wrote that confirm the bug.

      Attachments

        Activity

          People

            Unassigned Unassigned
            gsmiller Greg Miller
            Votes:
            0 Vote for this issue
            Watchers:
            5 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 - 2h 40m
                2h 40m