Skip to content
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

[Backport 2.x] Replace deprecated Query#rewrite(IndexReader with rewrite(IndexSearcher #8977

Merged
merged 1 commit into from
Jul 28, 2023

Conversation

opensearch-trigger-bot[bot]
Copy link
Contributor

Backport b282005 from #8967.

…er (#8967)

* Replace deprecated Query#rewrite(IndexReader with rewrite(IndexSearcher

Query#rewrite(IndexReader reader) is deprecated in Lucene 9.7 and
removed in Lucene 10 in favor of Query#rewrite(IndexSearcher searcher).
The latter provides LeafCollector hooks to optimize for concurrent
queries. This commit cuts over usage of rewrite(IndexReader) to
rewrite(IndexSearcher) for Lucene 10 compatibility and upstream query
optimizations.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>

* remove stray collector.finish

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>

---------

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
(cherry picked from commit b282005)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.search.SearchWeightedRoutingIT.testStrictWeightedRoutingWithCustomString

@codecov
Copy link

codecov bot commented Jul 28, 2023

Codecov Report

Merging #8977 (d1dc365) into 2.x (044ea25) will decrease coverage by 0.04%.
Report is 1 commits behind head on 2.x.
The diff coverage is 84.31%.

@@             Coverage Diff              @@
##                2.x    #8977      +/-   ##
============================================
- Coverage     70.80%   70.76%   -0.04%     
- Complexity    57357    57374      +17     
============================================
  Files          4745     4747       +2     
  Lines        271092   271124      +32     
  Branches      39988    39991       +3     
============================================
- Hits         191948   191863      -85     
- Misses        62656    62785     +129     
+ Partials      16488    16476      -12     
Files Changed Coverage Δ
...rg/opensearch/join/query/HasChildQueryBuilder.java 80.86% <0.00%> (-0.39%) ⬇️
...search/index/query/DateRangeIncludingNowQuery.java 76.92% <ø> (ø)
...search/suggest/completion/CompletionSuggester.java 2.85% <0.00%> (ø)
...search/common/lucene/search/MoreLikeThisQuery.java 58.38% <50.00%> (ø)
...org/opensearch/search/SearchBootstrapSettings.java 62.50% <62.50%> (ø)
...search/search/internal/MaxTargetSliceSupplier.java 92.30% <92.30%> (ø)
...java/org/opensearch/percolator/PercolateQuery.java 73.91% <100.00%> (ø)
...va/org/apache/lucene/queries/BlendedTermQuery.java 69.18% <100.00%> (+0.71%) ⬆️
...h/common/lucene/search/MultiPhrasePrefixQuery.java 62.22% <100.00%> (ø)
...mon/lucene/search/function/FunctionScoreQuery.java 84.34% <100.00%> (-0.44%) ⬇️
... and 7 more

... and 461 files with indirect coverage changes

@reta reta merged commit e7301fe into 2.x Jul 28, 2023
@github-actions github-actions bot deleted the backport/backport-8967-to-2.x branch July 28, 2023 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant