Skip to content

Conversation

@airborne12
Copy link
Member

Summary

Cherry-pick PR #58545 to branch-4.0.

This PR implements ES-like boolean query for inverted index, including:

Source files:

  • OccurBooleanQuery and related classes for ES-style MUST/SHOULD/MUST_NOT
  • OperatorBooleanQuery refactored to separate file
  • DisjunctionScorer, ExcludeScorer, ReqOptScorer implementations
  • BufferedUnion for efficient union operations
  • Updated intersection and segment_postings APIs

Unit tests:

  • boolean_query_builder_test.cpp
  • buffered_union_test.cpp
  • disjunction_scorer_test.cpp
  • exclude_scorer_test.cpp
  • occur_boolean_query_test.cpp
  • reqopt_scorer_test.cpp
  • Updated existing test files

Test plan

  • BE unit tests compile successfully
  • Unit tests pass verification

Related PR: #58545

🤖 Generated with Claude Code

Cherry-pick PR #58545 to branch-4.0.

This PR implements ES-like boolean query for inverted index, including:

Source files:
- OccurBooleanQuery and related classes for ES-style MUST/SHOULD/MUST_NOT
- OperatorBooleanQuery refactored to separate file
- DisjunctionScorer, ExcludeScorer, ReqOptScorer implementations
- BufferedUnion for efficient union operations
- Updated intersection and segment_postings APIs

Unit tests:
- boolean_query_builder_test.cpp
- buffered_union_test.cpp
- disjunction_scorer_test.cpp
- exclude_scorer_test.cpp
- occur_boolean_query_test.cpp
- reqopt_scorer_test.cpp
- Updated existing test files

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@airborne12 airborne12 requested a review from yiguolei as a code owner January 12, 2026 07:56
@hello-stephen
Copy link
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@airborne12
Copy link
Member Author

run buildall

@doris-robot
Copy link

BE UT Coverage Report

Increment line coverage 81.68% (740/906) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 53.47% (18863/35275)
Line Coverage 39.28% (174849/445108)
Region Coverage 33.98% (135287/398096)
Branch Coverage 34.93% (58458/167376)

@yiguolei
Copy link
Contributor

skip buildall

@yiguolei yiguolei merged commit 05c063d into branch-4.0 Jan 13, 2026
29 of 33 checks passed
@github-actions
Copy link
Contributor

PR approved by at least one committer and no changes requested.

@github-actions github-actions bot added approved Indicates a PR has been approved by one committer. reviewed labels Jan 13, 2026
@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

yiguolei pushed a commit that referenced this pull request Jan 14, 2026
…unction #59394 (#59745)

Cherry-picked from #59394

**Note:** This PR depends on #59766 (cherry-pick of #58545) being merged
first.

## Summary

Introduce lucene bool mode for search function.

## Test plan

- [ ] Regression tests (after dependency PR merged)

Related PRs: #59394
Depends on: #59766

Co-authored-by: Jack <jiangkai@selectdb.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants