DateRangeAggregation minDocCount filter

Hi,
I'm on version 6.5.3 using this aggregation via the java api and I don't see a way to filter based on numDocCount. Is there such a way and I just missed it? or if not, I would like to propose it.

Here is my code:

>         AggregationBuilder myagg = new CompositeAggregationBuilder("stats1", Arrays.asList( "1","2","3","4)).size(10000);
>         myagg
>                 .subAggregation(new ExtendedStatsBucketPipelineAggregationBuilder("stats2", "current>sum"))
>                 .subAggregation(new DateRangeAggregationBuilder("stats3")
>                         .field(DATETIME)
>                         .addRange(DateTime.now().minusWeeks(4), DateTime.now().minusWeeks(4).plusHours(3)) --> here I want to filter only if docCount > 1
>                         .addRange(DateTime.now().minusWeeks(3), DateTime.now().minusWeeks(3).plusHours(3))
>                         .addRange(DateTime.now().minusWeeks(2), DateTime.now().minusWeeks(2).plusHours(3))
>                         .addRange(DateTime.now().minusWeeks(1), DateTime.now().minusWeeks(1).plusHours(3))
>                         .subAggregation(new SumAggregationBuilder("stats4")
>                                 .field("myField))))

Thanks
Shira

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