Skip to content

Conversation

russcam
Copy link
Contributor

@russcam russcam commented Sep 30, 2019

Supersedes: #4103

Adds a unit test to assert that the change to AggregateJsonConverter for ExtendedStats aggregation
can deserialize the provided response.

benbenwilde and others added 4 commits September 26, 2019 15:43
Fixes an issue where datetime extended_stats aggregation was getting deserialized as a regular stats aggregation
Note that this fix might not impact anything in practice, since when this code is hit, the rest of the fields are "as_string" fields anyways (in the response examples I'm aware of).
This commit adds a unit test to assert that the change to AggregateJsonConverter for ExtendedStats aggregation
can deserialize the provided response.
@russcam russcam merged commit 1e45ee8 into 6.x Sep 30, 2019
russcam added a commit that referenced this pull request Sep 30, 2019
Add a unit test to assert that ExtendedStats aggregation can deserialize the provided response in #4103

(cherry picked from commit 1e45ee8)
russcam added a commit that referenced this pull request Sep 30, 2019
Add a unit test to assert that ExtendedStats aggregation can deserialize the provided response in #4103

(cherry picked from commit 1e45ee8)
russcam added a commit that referenced this pull request Oct 1, 2019
Add a unit test to assert that ExtendedStats aggregation can deserialize the provided response in #4103

(cherry picked from commit 1e45ee8)
@benbenwilde
Copy link

@russcam I'm still having issues with a datetime extended stats aggregation dropping subsequent aggregations. It looks like we need another reader.Read() here: https://github.com/elastic/elasticsearch-net/pull/4109/files#diff-0081650de00611fa377141b59e107f4fL406

I believe once the aggregate is parsed, the reader is supposed to end on the end token of the aggregation object. However, it looks like it's ending on the end token of the std_deviation_bounds_as_string instead.

@russcam
Copy link
Contributor Author

russcam commented Oct 2, 2019

Thanks @benbenwilde, that does sound like the case if subsequent aggs are not parsed and returned in the search response instance . I'll take a look at it today

russcam added a commit that referenced this pull request Oct 3, 2019
Relates: #4109

This commit fixes an issue with extended stats aggregation parsing whereby the closing brace of std_deviation_bounds_as_string
is not read when skipping over the object, leading to the reader exiting at this point, resulting in any subsequent aggregations
from not being read from the JSON response and added to SearchResponse.Aggregations.
@russcam
Copy link
Contributor Author

russcam commented Oct 3, 2019

@benbenwilde I've opened #4118 to address

russcam added a commit that referenced this pull request Oct 8, 2019
Relates: #4109

This commit fixes an issue with extended stats aggregation parsing whereby the closing brace of std_deviation_bounds_as_string
is not read when skipping over the object, leading to the reader exiting at this point, resulting in any subsequent aggregations
from not being read from the JSON response and added to SearchResponse.Aggregations.
@Mpdreamz Mpdreamz deleted the benbenwilde-6.x branch November 6, 2019 19:06
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