行动是治愈恐惧的良药,而犹豫、拖延将不断滋养恐惧。

关于es的timeout

Elasticsearch | 作者 sukerrainer | 发布于2019年10月28日 | 阅读数:2703





[root@bigdata-yace08 ~]# curl -X GET "bigdata-yace08:9200/test1/_search?pretty&timeout=1ms"
{
"took" : 2,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"skipped" : 0,
"failed" : 0
},
"hits" : {
"total" : 5,
"max_score" : 1.0,
"hits" : [
{
"_index" : "test1",
"_type" : "data",
"_id" : "fg1EEG4BTTB7U7d-DP5G",
"_score" : 1.0,
"_source" : {

为什么我设置的timeout=1ms,执行需要2ms,还能正常输出呢?
谢谢~
已邀请:

Marquezzzz

赞同来自:

timeout指的是等待Lucence执行query的时间,而took是ES统计整个query所消耗的时间。两个衡量的不是同一个时间。
see https://elasticsearch.cn/question/4141

要回复问题请先登录注册