繁体   English   中英

使用邮递员创建索引时在Elasticsearch中出错

[英]Getting error in Elasticsearch while creating index using postman

我已经在Ubuntu 14.04中安装了Elasticsearch 5.1。 我在Elasticsearch中执行了一些操作,例如创建索引,删除索引等。然后,我安装了Kibana 5.1。 现在,我想使用邮递员(带PUT的localhost:9200 / my_index)在elasticsearch中创建新索引。 但是我遇到了这个错误。

{
  "error": {
    "root_cause": [
      {
        "type": "illegal_argument_exception",
        "reason": "unknown setting [index.country] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"
      }
    ],
    "type": "illegal_argument_exception",
    "reason": "unknown setting [index.country] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"
  },
  "status": 400
}

我记得我曾经使用country作为索引或类型。 但是后来我清除了elasticsearch和kibana(也删除了与之相关的目录)。 都重新安装。 但是仍然出现此错误。 如果有人知道解决方案,将不胜感激。

这是一些您可能需要解决的查询的输出。

GET localhost:9200 / _mapping

{“ .kibana”:{“映射”:{“服务器”:{“属性”:{“ uuid”:{“类型”:“关键字”}}},“ config”:{“属性”:{“ buildNum “:{” type“:”关键字“}}}}}}

(获取)localhost:9200 / _cat / indices?v

[{“ health”:“黄色”,“ status”:“打开”,“ index”:“。kibana”,“ uuid”:“ O_ORG0ONQNCEe8JU_C0SKQ”,“ pri”:“ 1”,“ rep”:“ 1” ,“ docs.count”:“ 1”,“ docs.deleted”:“ 0”,“ store.size”:“ 3.1kb”,“ pri.store.size”:“ 3.1kb”}]

(获取)本地主机:9200 /国家

{“错误”:{“ root_cause”:[{“ type”:“ index_not_found_exception”,“ reason”:“无此类索引”,“ resource.type”:“ index_or_alias”,“ resource.id”:“国家”, “ index_uuid”:“ na ”,“ index”:“国家”}],“ type”:“ index_not_found_exception”,“ reason”:“无此类索引”,“ resource.type”:“ index_or_alias”,“ resource.id “:”国家“,” index_uuid“:” na “,” index“:”国家“},”状态“:404}

您可以简单地这样发出一个PUT请求:

http://localhost:9200/indexname <--- give your index name

然后在您的请求正文中,您可以给出mappings

{
  "mappings": {
    "message_logs": {
      "properties": {
        "anyfield": { <-- give your field
          "type": "text" <-- and the type
        }
      }
    }
  }
}

如果您愿意使用CURL创建索引,此SO可能会对您有所帮助。 以上只是一个示例。 您可以复制它。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM