-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor implementations of query phase searcher, add empty QueryColl…
…ectorContext (#13481) * Refactor implementations of query hpase searcher by adding overloaded searchWith method Signed-off-by: Martin Gaievski <[email protected]> * Switched to Empty context add rescoring interface Signed-off-by: Martin Gaievski <[email protected]> * Changed if by simple null check for querycontext argument Signed-off-by: Martin Gaievski <[email protected]> * Added Override annotation for searchWith method Signed-off-by: Martin Gaievski <[email protected]> * Remove old override method from Concurrent Query Phase Searcher Signed-off-by: Martin Gaievski <[email protected]> --------- Signed-off-by: Martin Gaievski <[email protected]> (cherry picked from commit 5ff50a7) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
8b9f383
commit 389f322
Showing
6 changed files
with
100 additions
and
15 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
27 changes: 27 additions & 0 deletions
27
server/src/main/java/org/opensearch/search/query/RescoringQueryCollectorContext.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* The OpenSearch Contributors require contributions made to | ||
* this file be licensed under the Apache-2.0 license or a | ||
* compatible open source license. | ||
*/ | ||
|
||
package org.opensearch.search.query; | ||
|
||
import org.opensearch.common.annotation.PublicApi; | ||
|
||
/** | ||
* Abstraction that allows indication of whether results should be rescored or not based on | ||
* custom logic of exact {@link QueryCollectorContext} implementation. | ||
* | ||
* @opensearch.api | ||
*/ | ||
@PublicApi(since = "2.15.0") | ||
public interface RescoringQueryCollectorContext { | ||
|
||
/** | ||
* Indicates if results from the query context should be rescored | ||
* @return true if results must be rescored, false otherwise | ||
*/ | ||
boolean shouldRescore(); | ||
} |
This file contains 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