Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        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);
        }