-
Notifications
You must be signed in to change notification settings - Fork 2.4k
#17593 Add Extension Points For Pre and Post Collection of Scores in QueryPhase #18814
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
#17593 Add Extension Points For Pre and Post Collection of Scores in QueryPhase #18814
Conversation
❌ Gradle check result for da66380: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
server/src/test/java/org/opensearch/search/query/QueryPhaseExtensionTests.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/search/query/QueryPhaseExtension.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/search/query/QueryPhase.java
Outdated
Show resolved
Hide resolved
server/src/test/java/org/opensearch/search/query/QueryPhaseExtensionTests.java
Outdated
Show resolved
Hide resolved
❌ Gradle check result for 0a0f121: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
server/src/main/java/org/opensearch/search/query/ConcurrentQueryPhaseSearcher.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Atri Sharma <[email protected]>
@bugmakerrrrrr can you take another look and we can get this in? |
server/src/main/java/org/opensearch/search/query/ConcurrentQueryPhaseSearcher.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/search/query/QueryPhase.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/search/query/QueryPhaseExtension.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/search/query/QueryPhaseExtension.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Atri Sharma <[email protected]>
@bugmakerrrrrr Updated, please see and let me know |
Signed-off-by: Atri Sharma <[email protected]>
server/src/main/java/org/opensearch/search/query/QueryPhase.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/search/query/QueryPhase.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/search/query/QueryPhase.java
Outdated
Show resolved
Hide resolved
❌ Gradle check result for bfad37b: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Signed-off-by: Atri Sharma <[email protected]>
@bugmakerrrrrr Please review. |
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.
LGTM. Thanks @atris
…tion of Scores in QueryPhase (opensearch-project#18814) Signed-off-by: Atri Sharma <[email protected]> Signed-off-by: sunqijun.jun <[email protected]>
…tion of Scores in QueryPhase (opensearch-project#18814) Signed-off-by: Atri Sharma <[email protected]>
…tion of Scores in QueryPhase (opensearch-project#18814) Signed-off-by: Atri Sharma <[email protected]>
Resolves #17593
Problem
Plugins implementing hybrid queries and neural search currently rely on AggregationProcessor workarounds to inject custom CollectorManager implementations. This approach is fragile and breaks when the aggregation system changes.
Solution
Add extension points directly in QueryPhase around the actual score collection operation:
QueryPhaseExtension
interface withbeforeScoreCollection()
andafterScoreCollection()
methodsQueryPhaseSearcher.queryPhaseExtensions()
DefaultQueryPhaseSearcher
with proper error isolationImplementation
New interface:
Testing
Unit tests verify:
No existing functionality affected.