-
Notifications
You must be signed in to change notification settings - Fork 715
chore: remove special handler for negative index search #8213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greptile Summary
This PR removes special handling for negative index search conditions across the OpenObserve search pipeline. The changes primarily affect two key files in the search service:
In src/service/search/index.rs: The PR eliminates methods that identified and segregated negative conditions from positive ones. Specifically, it removes:
is_negated_condition()methods from bothIndexConditionandConditionstructs that detected negated conditions (NOT, NOT IN, !=)split_condition_by_negated()method that separated conditions into positive and negative groups for different processing paths- Associated unit tests for this functionality
In src/service/search/grpc/storage.rs: The PR simplifies the inverted index decision logic by removing complex condition splitting and recombining functions:
- Removes
check_inverted_index()function that split conditions into positive/negative parts - Removes
generate_add_filter_back_condition()function that combined different condition types - Replaces the complex logic with a straightforward inline check for inverted index usage
- Eliminates extensive test coverage for the removed functions
The refactoring consolidates the search logic to treat all conditions uniformly, whether they are positive (=, IN, contains) or negative (!=, NOT IN, not_contains). This aligns with modern search engine capabilities where negative conditions can be processed efficiently without requiring separate code paths. The change reduces technical debt and simplifies the codebase by removing the artificial distinction between condition types at the index level, allowing the underlying Tantivy search engine to handle all condition types through its standard query processing.
Confidence score: 4/5
- This PR appears safe to merge with careful review of the search functionality
- Score reflects solid refactoring that removes complexity without introducing obvious bugs
- Pay close attention to search performance and correctness testing to ensure negative conditions still work properly
2 files reviewed, no comments
PR Code Suggestions ✨Explore these optional code suggestions:
|
Uh oh!
There was an error while loading. Please reload this page.