无法从命令行使用映射创建索引

时间:2019-02-05 19:47:22

标签: elasticsearch

尝试像这样从命令行创建带有索引的索引:

curl -X PUT 'http://localhost:9200/my_index' -d '
{
  "mappings": {
    "_doc": {
      "properties": {
        "user": {
          "type": "nested" 
        }
      }
    }
  }
}'

遇到此错误:

{"error":{"root_cause":[{"type":"invalid_type_name_exception","reason":"mapping type name [_doc] can't start with '_'"}],"type":"invalid_type_name_exception","reason":"mapping type name [_doc] can't start with '_'"},"status":400}%

有人知道这是什么问题吗?

0 个答案:

没有答案