-
Notifications
You must be signed in to change notification settings - Fork 695
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
Feat: add support for docvalue_fields and stored_fields in TopHitsAggregation #3176
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stored fields are not the same thing as doc value fields, see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-metrics-top-hits-aggregation.html. The existing storedFields
field is not used in the builder, so that could be added. If you want to add docValueFields
a field would have to be added to the TopHitsAggregation
case class and an accompanying docvalueFields
method similar to what is done in the InnerHit
case class.
820de83
to
71678e5
Compare
Thank you for the quick review. I fixed the |
...s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/TopHitsAggregation.scala
Outdated
Show resolved
Hide resolved
…ards compatibility
Thank you! |
Thank you for the quick merge ! |
Do you think you could make a release soon ? |
I'd like to include the update to Elasticsearch 8.15.3, which looks to be imminent. |
Hello,
It is currently impossible to my understanding to add "docvalue_fields" to a top hits aggregation. Here's a proposition using the storedFields field.
Thanks