Range Aggregation using problem with Java API[5.0]

I am using Range Aggregation with Java API [5.0] and following the documentations in below link.
And executing the following code :

System.out.println(" ---range agg--- "+AggregationBuilders.range("agg").field("height").addUnboundedTo(1.0f).addRange(1.0f, 1.5f).addUnboundedFrom(1.5f));

And getting { "error" : "JsonGenerationException[Can not write a field name, expecting a value]"} can anyone help me here please where i am doing wrong.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.