private IBucket GetFiltersBucket(JsonReader reader, JsonSerializer serializer) { reader.Read(); var filtersBucketItem = new FiltersBucketItem { DocCount = (reader.Value as long?).GetValueOrDefault(0) }; reader.Read(); filtersBucketItem.Aggregations = this.GetSubAggregates(reader, serializer); return(filtersBucketItem); }
private IBucket GetFiltersBucket(JsonReader reader, JsonSerializer serializer) { reader.Read(); var docCount = (reader.Value as long?).GetValueOrDefault(0); reader.Read(); var nestedAggregations = GetSubAggregates(reader, serializer); var filtersBucketItem = new FiltersBucketItem(nestedAggregations) { DocCount = docCount }; return(filtersBucketItem); }
private IBucket GetFiltersBucket(ref JsonReader reader, IJsonFormatterResolver formatterResolver) { var docCount = reader.ReadNullableLong().GetValueOrDefault(0); reader.ReadNext(); // , var propertyName = reader.ReadPropertyName(); var subAggregates = GetSubAggregates(ref reader, propertyName, formatterResolver); var filtersBucketItem = new FiltersBucketItem(subAggregates) { DocCount = docCount }; return(filtersBucketItem); }