apache / lucene

Apache Lucene open-source search software
https://lucene.apache.org/
Apache License 2.0
2.45k stars 973 forks source link

Backport to 9x: Reduce duplication in taxonomy facets; always do counts #12966 #13358

Closed stefanvodita closed 1 month ago

stefanvodita commented 1 month ago

Annoying things I had to do to backport #12966:

  1. TaxonomyFacetCounts stores the counts twice because it extends IntTaxonomyFacets. The correct way would be to extend TaxonomyFacets, but I couldn't make that change, like I could for FastTaxonomyFacets, which was marked @lucene.experimental.
  2. Increase visibility of useHashTable and rollup in TaxonomyFacets compared to main, from default to protected.
  3. Leave TopOrdAndInt/FloatQueue as they were, since they are public API, and create new queues for our purposes, TopOrdAndInt/FloatNumberQueue, marked deprecated because they will go away in 10.x.
stefanvodita commented 1 month ago

Despite the "annoying" bits in the description, I don't expect this backport to be controversial, but reviews are welcome! I plan to wait over the weekend and then merge.

stefanvodita commented 1 month ago

Thank you for the review, Mike! I'd already put the CHANGES entries in 9.11 tentatively, now they're correct 😄