-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Compound query #51967
Comments
Pinging @elastic/es-search (:Search/Search) |
This introduces compound query that allows to combine scores from wrapped queries in a number of ways: { "query": { "compound": { "queries": [ { "match": {"message": "elasticsearch"} }, { "match": {"author": "shay banon"} } ], "combine_mode": "sum" } } } Options for combine_mode: sum, multiply, avg, first, max, min compound query allows to deprecate function_score query. closes elastic#51967
This introduces compound query that allows to combine scores from wrapped queries in a number of ways: { "query": { "compound": { "queries": [ { "match": {"message": "elasticsearch"} }, { "match": {"author": "shay banon"} } ], "combine_mode": "sum" } } } Options for combine_mode: sum, multiply, avg, first, max, min compound query allows to deprecate function_score query. closes elastic#51967
Closing this issue, as it is replaced by #52482 |
This introduces compound query that allows to combine scores from wrapped queries in a number of ways: { "query": { "compound": { "queries": [ { "match": {"message": "elasticsearch"} }, { "match": {"author": "shay banon"} } ], "combine_mode": "sum" } } } Options for combine_mode: sum, multiply, avg, first, max, min compound query allows to deprecate function_score query. closes elastic#51967
We had a plan to deprecate function_score query with script_score query, but ran into a roadblock of missing functionality to combine scores from different functions (particularly "first" script_score). Wee have several proposal to address this missing functionality: [scripted_boolean](elastic#27588 (comment)) [compound_query](elastic#51967) [first_query](elastic#52482) But for now, we decided not to deprecate function_score query, and hence we need to remove any mention that we are deprecating it. Relates to elastic#42811 Closes elastic#71934
We had a plan to deprecate function_score query with script_score query, but ran into a roadblock of missing functionality to combine scores from different functions (particularly "first" script_score). Wee have several proposal to address this missing functionality: [scripted_boolean](#27588 (comment)) [compound_query](#51967) [first_query](#52482) But for now, we decided not to deprecate function_score query, and hence we need to remove any mention that we are deprecating it. Relates to #42811 Closes #71934
We had a plan to deprecate function_score query with script_score query, but ran into a roadblock of missing functionality to combine scores from different functions (particularly "first" script_score). Wee have several proposal to address this missing functionality: [scripted_boolean](#27588 (comment)) [compound_query](#51967) [first_query](#52482) But for now, we decided not to deprecate function_score query, and hence we need to remove any mention that we are deprecating it. Relates to #42811 Closes #71934
We had a plan to deprecate function_score query with script_score query, but ran into a roadblock of missing functionality to combine scores from different functions (particularly "first" script_score). Wee have several proposal to address this missing functionality: [scripted_boolean](#27588 (comment)) [compound_query](#51967) [first_query](#52482) But for now, we decided not to deprecate function_score query, and hence we need to remove any mention that we are deprecating it. Relates to #42811 Closes #71934
Hi @mayya-sharipova - closing of the linked issue reminded me of this, and I noticed that there was an implementation in-progress at one point (#52387). Are there any plans to introduce something like a Edit: sorry, in hindsight I should've waited until after the weekend to ask about this. It's neither urgent nor important, just something I'm interested in. |
@jayaddison Thank you for your interest. We did not pursue this work till the end, as we had some other priorities to work on. We will try to re-discuss this topic and get back to it. |
Thanks @mayya-sharipova, that makes sense. At the risk of over-communicating: I've removed my upvote from this issue because I don't know for certain whether compound queries would address my use case. I'll rephrase my problem as a feature request (linked to this one for the possibility of relevance) to try to gauge whether it has support. (in other words: don't feel any pressure to re-discuss this; that may not be required unless other people want this query functionality) Edit: feature requested opened as issue 88086 - I'm not #mentioning that issue number intentionally because I think it would introduce more noise than value. |
This is related to #42811 -- deprecating function_score query
A proposal is to have a new type of compound query that has an ability to combine scores from different queries:
combine_mode has the same values and definitions as in Function Score Query's score_mode
The intention for this query is to allow custom scoring logic, so internal queries are primarily expected to be
script_score
queries. For example, the intention fo the following query is to find "best fit" candidate with necessary skills:The text was updated successfully, but these errors were encountered: