-
Notifications
You must be signed in to change notification settings - Fork 85
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
How pagination depth works with knn and neural query? #1202
Comments
Some more information regarding this question. I do ingest following set of documents, 8 of them do have vectors:
When I do knn query where k and from value do not have overlap it gives me empty response
now I use exact same knn query in hybrid query along with other query
this gives me following 2 docs
interestingly enough the second doc from response cannot be related to range query because it has I found that this doc is actually at position 4 of raw knn results. That means we do not apply the from/size at the sub-query level, but later in the process:
this is the create index request for my scenario
|
I need a clarification from the team regarding one aspect of hybrid query when it's used with knn/neural query and pagination feature.
In recently developed pagination feature for hybrid query (released in 2.19) new parameter
pagination depth
sets the max number of doc scores that can be collected at the shard level for a single sub-query. Effectively that works in a same way as existingsize
.For knn and neural queries there is one more parameter that works in a similar way and can limit the number of documents we retrieve from the shard or even segment level. This parameter is
k
, and typical recommendation is to keep size and k equal.My question is: does the pagination depth in hybrid query change this behavior, or knn/neural query will keep work as they do today?
And is there a documentation that describes this behavior? This is important to know because vector query is normally part of the hybrid search.
The text was updated successfully, but these errors were encountered: