Skip to content
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

adds matched_queries field for the Hit object #153

Merged
merged 2 commits into from
Nov 26, 2024

Conversation

AnyRoad
Copy link
Contributor

@AnyRoad AnyRoad commented Nov 25, 2024

Each query accepts a _name in its top level definition.
You can use named queries to track which queries matched
returned documents. If named queries are used, the response
includes a matched_queries property for each hit.

There are two forms of the matched_queries response:

  • if include_named_queries_score was set, response includes map with named query and score
  • otherwise just list of the named queries. so new field is just a JsonElement with 2 extension functions for each case.

 Each query accepts a _name in its top level definition.
 You can use named queries to track which queries matched
 returned documents. If named queries are used, the response
 includes a matched_queries property for each hit.

 There are two forms of the matched_queries response:
  - if include_named_queries_score was set, response includes
    map with named query and score
  - otherwise just list of the named queries.
 so new field is just a JsonElement with 2 extension functions
 for each case.
@jillesvangurp
Copy link
Owner

Thanks for this. The build failed because of some issue with libcurl on gh actions. Can you merge master? That should fix it.

@jillesvangurp jillesvangurp merged commit 1cc78aa into jillesvangurp:master Nov 26, 2024
1 check passed
@AnyRoad
Copy link
Contributor Author

AnyRoad commented Nov 26, 2024

Thank you! Sorry, did not have time to merge it in the morning 😃

@jillesvangurp
Copy link
Owner

No worries; merged myself. It turns out this only works with newer versions of opensearch and elasticsearch. So had to fix the test for that as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants