How to find (many) documents with the same property in Elasticsearch?
You can use a terms
aggregation with the min_doc_count
setting, like this:
POST events/_search{ "size": 0, "aggs": { "receipts": { "terms": { "field": "receiptId", "min_doc_count": 1000 } } }}