Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/Nest/Aggregations/AggregateFormatter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -325,9 +325,11 @@ private IAggregate GetPercentilesAggregate(ref JsonReader reader)
metric.Items.Add(new PercentileItem
{
Percentile = double.Parse(propertyName),
Value = reader.ReadDouble()
Value = reader.ReadNullableDouble()
});
}

reader.ReadNext(); // }
}
else
{
Expand All @@ -343,10 +345,12 @@ private IAggregate GetPercentilesAggregate(ref JsonReader reader)
metric.Items.Add(new PercentileItem
{
Percentile = percentile,
Value = reader.ReadDouble()
Value = reader.ReadNullableDouble()
});
reader.ReadNext(); // }
}

reader.ReadNext(); // ]
}

return metric;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Nest
public class PercentileItem
{
public double Percentile { get; internal set; }
public double Value { get; internal set; }
public double? Value { get; internal set; }
}

public class PercentilesAggregate : MetricAggregateBase
Expand Down
Loading