如何查询Elasticsearch:我一直在获取index_not_found_exception

时间:2018-11-14 02:54:58

标签: elasticsearch

Elasticsearch 6.4.3

问题:/ _search命令返回:

index_not_found_exception

特别是:

$ curl -X GET "192.168.2.2:9200/MyNew_Index/_search" -H 'Content-Type: application/json'
{
"from": 0,
"size": 40,
"sort":
...

返回:

{
    "error": {
        "root_cause": [{
            "type": "index_not_found_exception",
            "reason": "no such index",
            "resource.type": "index_or_alias",
            "resource.id": "MyNew_Index",
            "index_uuid": "_na_",
            "index": "MyNew_Index"
        }],
...

但是当我查看存在哪些索引时,就会看到它:

$ curl -X GET "192.168.2.2:9200/_cat/indices?v" -H 'Content-Type: application/json'
health status index                          uuid                   pri rep docs.count docs.deleted store.size pri.store.size
green  open   MyNew_Index 71X8IOLzQaKqj7aaK5CRbA  50   1  900288822
3322978        1tb        533.4gb

我想念什么?

0 个答案:

没有答案