How can we clear searchSource.aggs

as we know, if we wanna add agg param, we can use searchSource.aggs(xxx), but how can we clear the aggs params, any interface?

You can clear the aggs param (or any other), by just passing null to the method: searchSource.aggs(null).


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