Skip to content

Conversation

konbur
Copy link

@konbur konbur commented May 5, 2017

If search requests multiple aggregations and there present scripted metric aggregation that returns Map (dictionary), some aggregations absent in Aggregations after json deserializaion

This fixes requires perfrom reader.Read() in any case before this line:
return new ScriptedMetricAggregate { _Value = scriptedMetric };

So reader state stays correct after current aggregate processing

fix reader state in case of scriptedMetric aggregate
@Mpdreamz
Copy link
Member

Mpdreamz commented May 5, 2017

Thank you for this @konbur 👍 Can you verify you have signed our CLA?

Are you able to attach a test for this?

For 6.0 we will rely on a new feauture in elasticsearch called typed_keys which will return aggregation names prefixed with type# which will completely replace the current heuristics based parser 🎉 🎈

@konbur
Copy link
Author

konbur commented May 6, 2017

CLA signed for now

Addition test (ScriptedMetricMultiAggregationTests) attached, integration mode required:

ScriptedMetricAggregationUsageTests.zip

Mpdreamz added a commit that referenced this pull request May 9, 2017
@Mpdreamz
Copy link
Member

Mpdreamz commented May 9, 2017

Manually pulled this as per #2761 @konbur

Many thanks for the PR!

@Mpdreamz Mpdreamz closed this May 9, 2017
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