-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Fix for propagating filters from compound to inner retrievers #117914
base: main
Are you sure you want to change the base?
Fix for propagating filters from compound to inner retrievers #117914
Conversation
Hi @pmpailis, I've created a changelog YAML for you. |
this.rankWindowSize = rankWindowSize; | ||
this.rankDocs = rankDocs; | ||
if (sources == null || sources.isEmpty()) { | ||
throw new IllegalArgumentException("sources must not be null or empty"); | ||
} | ||
this.sources = sources; | ||
this.preFilterQueryBuilders = preFilterQueryBuilders; |
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.
The prefilters were not actually used anywhere for the RankDocsRetrieverBuilder
as they had already been accounted for when computing the parent results.
Pinging @elastic/es-search-relevance (Team:Search Relevance) |
run elasticsearch-ci/part-3 |
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.
Could you add a test that exposes the bug? My understanding was that it appeared when using a top level filter with a query_vector_builder in kNN. Lets add a test for that somewhere. It can be a simple single node test (not yaml).
To make the query vector builder stuff easier to test, you can maybe add a "test query vector builder" that simply returns a constant vector.
server/src/main/java/org/elasticsearch/search/retriever/CompoundRetrieverBuilder.java
Show resolved
Hide resolved
That's a good idea. The |
This PR aims to fix an issue where the inner filters are not properly added to the children of compound retrievers if they require different number of rewrite rounds.