Elasticsearch is failing to run aggregations with huge data without any errors

31 views Asked by At

Having a lot of data 160k+ documents in the index in a cluster of 3 nodes, when running a query and aggregation with runtime mapping I got the hits only without even filtering the results.

Only with size 0 it works

Example: A runtime mapping to calculate two fields A query that will filter the documents to 2.7k Aggregations

Structured as follows:

{
  "size": 1,
  "runtime_mappings": {-},
  "query": {-},
  "aggs": {-},
}
  1. With size: 1
{
  "took" : 2,
  "timed_out" : false,
  "_shards" : {
    "total" : 1,
    "successful" : 1,
    "skipped" : 0,
    "failed" : 0
  },
  "hits" : {
    "total" : {
      "value" : 10000,
      "relation" : "gte"
    },
    "max_score" : 1.0,
    "hits" : [-]
  }
}

Check screenshot

  1. With size: 0
{
  "took" : 5,
  "timed_out" : false,
  "_shards" : {
    "total" : 1,
    "successful" : 1,
    "skipped" : 0,
    "failed" : 0
  },
  "hits" : {
    "total" : {
      "value" : 2731,
      "relation" : "eq"
    },
    "max_score" : null,
    "hits" : [ ]
  },
  "aggregations" : [-]
}

Check screenshot

Is there anyone encountered such an issue ?

Any help is much appreciated, thanks.

0

There are 0 answers