亲,只收二进制

请教个关于mapping id的问题

Elasticsearch | 作者 bit0x04ca | 发布于2019年08月08日 | 阅读数:2468

我在创建索引mapping的时候没有指定任何id,es会自动为每个文档创建id吗?
PUT myindex/_mapping
{
"properties":{
"name":{
"type":"keyword",
"index" : "false"
},
"sex":{
"type":"integer"
}
}
}
 
如果需要让es自动产生id,是不是要重新创建索引然后再迁移数据?
新手刚接触研究得不是很深入,希望能帮忙解答一下,谢谢!
已邀请:

bellengao - 博客: https://www.jianshu.com/u/e0088e3e2127

赞同来自: bit0x04ca

是会自动生成ID的

fanmo3yuan

赞同来自:

查询得到的结果中可以明确看到 _id 这个field

要回复问题请先登录注册