How to get Unique Records

Use a terms aggregation. Not the significant_text.

Then read carefully the documentation at:

Specifically:

If you want to retrieve all terms or all combinations of terms in a nested terms aggregation you should use the Composite aggregation which allows to paginate over all possible terms rather than setting a size greater than the cardinality of the field in the terms aggregation. The terms aggregation is meant to return the top terms and does not allow pagination.

1 Like