Listing all values of one field

Hello,

I have a big index (in fact many: one per day) with a field "id". I would like to know each value that this field has. The classical answer is :

{
  "size": 0,
  "aggs": {
    "2": {
      "terms": {
        "field": "id.keyword",
        "size": 100
      }
    }
  }
}

This is working! However it doesn't help me because:

  • I need all the values, not the top 100
  • I have a cardinality of millions and the 12 big server ES is hanging with size = 100000

However:

  • I don't need to order the fields
  • I don't need the counts

Is there a way to just get the list of the values of "id.keyword"?

/EDIT/ I'm using a 6.0.0 version of ES.

I forgot to mention, I'm using ES 6.0.0.

You could take a look at the composite aggregation, allowing you to paginate through all buckets.

Unfortunately, the composite aggregation is not available for 6.0.0 Elasticsearch.

Sounds like a potentially good reason to upgrade to a more recent release.

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