-
Notifications
You must be signed in to change notification settings - Fork 66
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
[BUG] Upgrade from OpenSearch 2.11 -> 2.13 breaks working boolean+hybrid query, hybrid+request_processor combinations #903
Comments
I think @martin-gaievski has more context knowledge on the hybrid query. |
@sutsr the behavior you're seeing in 2.13 is expected, we have closed the possibility of having hybrid query nested/wrapped into some other query. The change has been introduced in 2.12, #498. |
Thanks for the clarification and explanation @martin-gaievski. Can you offer some guidance on how best to rework queries along the lines of my example queries? Should a boolean query inside e.g.
|
@sutsr right, post filter should solve your use case, it does not considered to be a wrapper for the hybrid query. As long you don't need exact number of results and ok with post processing of the main query results post filters is a good choice. |
What is the bug?
I have two query types that ran fine on OpenSearch 2.11, but after upgrading to 2.13, error with illegal argument exceptions of
hybrid query must be a top level query and cannot be wrapped into other queries
.Request processor used to combine a criterion with a hybrid search
Top level boolean used to combine an exclusion criterion with the results of a hybrid search
How can one reproduce the bug?
Attempt to combine a hybrid query with a search pipeline request processor or use it as part of a boolean query in the fashion shown by the example queries.
The index used for these queries has the following fields:
search_as_you_type
knn_vector
strict_year_month_day
boolean
What is the expected behavior?
In the first instance, I expect the hybrid query to run, only returning results that meet the additional criterion from the request processor.
In the second instance I expect the query to run and return results that meet both conditions.
What is your host/environment?
AWS Managed OpenSearch
Do you have any screenshots?
Not applicable
Do you have any additional context?
The model used for neural search is an external model calling out to OpenAI's ada-002 embedding API configured as per the blueprint
The text was updated successfully, but these errors were encountered: