-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
So this has been a bit of a head scratcher
.Aggregations( a=> a
.Terms("searchTerms", at => at
.Field("searchTerm.raw")
.Size(100)
.Aggregations( rs => rs
.Stats("pageRankStats", prs => prs.Field("pageRank"))
.Percentiles("pageRankMedian", prm => prm.Field("pageRank").Percentages(new double[]{50.0}))))
I should expect to see two aggregations for each search term, the "pageRankStats", "pageRankMedian".
Using the following code to access the results
foreach(KeyItem x in ((Bucket)result.Aggs.Aggregations["searchTerms"]).Items)
{
var stats = x.Stats("pageRankStats");
var median = x.Percentiles("pageRankMedian");
}
what I am finding is stats is null and median is populated as expected. If however, I can the second aggregation to be a stats aggregation then I am able to access both aggregation results.
Is this not supported?
Thanks in advance
Doug
Metadata
Metadata
Assignees
Labels
No labels