opensearch-project / opensearch-go

Go Client for OpenSearch
https://opensearch.org/docs/latest/clients/go/
Apache License 2.0
188 stars 96 forks source link

Add MatchedQueries field to opensearchapi.SearchHit #573

Open nics opened 6 days ago

nics commented 6 days ago

Is your feature request related to a problem?

I use the _name field in boolean queries to identify which clause matched, but the corresponding matched_queries field is not included in opensearchapi.SearchHit.

What solution would you like?

Add a MatchedQueries []string field to SearchHit.

Do you have any additional context?

I'm using v4.0.0 of the Go client.

See https://opensearch.org/docs/latest/query-dsl/compound/bool/ for the _name feature.