Decouple HybridIndex from BaseInvertedIndex internals - #85
Merged
Merged
Conversation
PopularTermDiscarding centralizes popularity thresholds and discarded-term computation for term-keyed partitions. InvertedHybridConfiguration holds the shared term-keying cutoff; HybridIndex reads discard policy from config rather than package methods on TermIndex.
Matches the prior number of config reads when building a hybrid index.
Use LongTermsAndValuesTestFactory because the entity constructor is package-private to com.uber.ussi.entity.termsandvalues.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PopularTermDiscardPolicy(same algorithm and config keys as before).InvertedHybridConfigurationfor the shared term-keying cutoff (still 270;SignatureIndex.NUM_SIGNATURES_PER_ROWaliases it).HybridIndexuses those types instead ofBaseInvertedIndex.discardedTermsOfand package methods onTermIndex.No search-path or index-build logic changes: hybrid still partitions rows the same way, passes the same discard set into
TermIndex, and keeps the samemaySearchIndexorchestration.Behavior and performance
BaseInvertedIndex; cutoff constant value unchanged.max_fraction_ids_per_termonce for discards and fortermPopularityFilteringEnabled(same count as before viadiscardedTermsOf(namespaceConfig, …)plustermIndex.discardsPopularTerms()reading the child field).Test plan
bazel test //:test_mainPopularTermDiscardPolicyTest(discard threshold)HybridIndexTestcoverage unchanged