如同磁铁吸引四周的铁粉,热情也能吸引周围的人,改变周围的情况。

elasticsearch返回hits中,无数据的情况下返回了查询语句

匿名 | 发布于5 天前 | 阅读数:92

php7,  "elasticsearch/elasticsearch": "6.7",
elasticsearch版本
   "version": {
"number": "7.0.0",
"build_flavor": "default",
"build_type": "tar",
"build_hash": "b7e28a7",
"build_date": "2019-04-05T22:55:32.697037Z",
"build_snapshot": false,
"lucene_version": "8.0.0",
"minimum_wire_compatibility_version": "6.7.0",
"minimum_index_compatibility_version": "6.0.0-beta1"
},

返回结果, hits的source中为什么返回了查询语句,????
        Array
(
[took] => 98
[timed_out] =>
[_shards] => Array
(
[total] => 1
[successful] => 1
[skipped] => 0
[failed] => 0
)

[hits] => Array
(
[total] => Array
(
[value] => 1
[relation] => eq
)

[max_score] =>
[hits] => Array
(
[0] => Array
(
[_index] => order_index_v1
[_type] => _doc
[_id] => _searh
[_score] => 0
[_source] => Array
(
[sort] => Array
(
[0] => Array
(
[_score] => desc
)

[1] => Array
(
[id] => desc
)

)

[_source] => Array
(
)

[query] => Array
(
[bool] => Array
(
[must_not] => Array
(
[0] => Array
(
[exists] => Array
(
[field] => befrom
)

)

)

)

)

[from] => 0
[size] => 10
[track_total_hits] => 1
)

[sort] => Array
(
[0] => 0
[1] => -9223372036854775808
)

)

)

)

)
已邀请:

laoyang360 - [死磕Elasitcsearch]知识星球地址:http://t.cn/RmwM3N9;微信公众号:铭毅天下; 博客:https://elastic.blog.csdn.net

赞同来自: lau

这种情况遇到过,是你之前将查询语句 作为新增数据 put进对应索引了

tacsklet - 公司有用到es

赞同来自:

用/_cat/indices?v看看里面到底有没有数据

要回复问题请先登录注册