Java high level client 7.10 shard successful 0 when took > 1000

Hi
I'm using java high level client to execute aggregation。 when the took in response gt 1000,it give a wrong result like below( it always ok when i do it in kibana):

{
  "took": 1002,
  "timed_out": false,
  "terminated_early": false,
  "num_reduce_phases": 0,
  "_shards": {
    "total": 20,
    "successful": 0,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": {
      "value": 0,
      "relation": "gte"
    },
    "max_score": null,
    "hits": 
  }
}

and when i redo the search,it may success or not .it success like below(it's took less than 1000)

{
  "took" : 231,
  "timed_out" : false,
  "_shards" : {
    "total" : 20,
    "successful" : 20,
    "skipped" : 0,
    "failed" : 0
  },
  "hits" : {
    "total" : {
      "value" : 10000,
      "relation" : "gte"
    },
    "max_score" : null,
    "hits" : [ ]
  },
  "aggregations" : {
    "term0" : {
      "doc_count" : 8526098,
      "countCOUNT_DISTINCTdid" : {
        "value" : 3929368
      }
    }
  }
}

It looks like failfast.Why is this and how to solve it.

Could you share the exact code you are using?

How do you build the client is mainly what I'd like to see.

What kind of cluster is running behind it? How many nodes? Where is this running?

I find it because i'm using async search but forgot check if it is finished。
if it is still running ,it give a incompletion result as above.
it looks like failfast because wait_for_completion_timeout's default value is 1s.Submit async search API

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