Skip to content

Conversation

l-trotta
Copy link
Contributor

@l-trotta l-trotta commented Apr 2, 2025

Generated output + unit test handling matched_queries as an actual array | map union.
Generator reference: https://github.com/elastic/elastic-client-generator-java/pull/58
Fixes #634

@l-trotta l-trotta requested a review from swallez April 2, 2025 13:13
// Array case, deserializing it into a map with null values
if (event == Event.START_ARRAY) {
while ((event = parser.next()) != Event.END_ARRAY) {
JsonpUtils.ensureAccepts(itemDeserializer, parser, event);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be JsonpUtils.expectEvent(Event.VALUE_STRING, event): itemDeserializer is for map values, and in the case of an array we only have string values that would be keys in the map.

@l-trotta l-trotta merged commit 93f0b50 into main Apr 2, 2025
9 checks passed
@l-trotta l-trotta deleted the support-include-names-queries-score branch April 2, 2025 14:12
github-actions bot pushed a commit that referenced this pull request Apr 2, 2025
* prep

* regen on generator changes + unit test

* restore include_names_queries_score

* checkstyle

* array can only expect string in this case
l-trotta added a commit that referenced this pull request Apr 3, 2025
* prep

* regen on generator changes + unit test

* restore include_names_queries_score

* checkstyle

* array can only expect string in this case

Co-authored-by: Laura Trotta <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support include_named_queries_score in search requests

2 participants