代码之家  ›  专栏  ›  技术社区  ›  Jonesome Reinstate Monica

如何查询elasticsearch:我一直在获取index_not_found_异常

  •  1
  • Jonesome Reinstate Monica  · 技术社区  · 7 年前

    弹性搜索6.4.3

    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 回复  |  直到 7 年前