一、es6.x
{
"settings": {
"number_of_shards": "2",
"number_of_replicas": "2",
"max_result_window": 100000
},
"mappings": {
"doc": {
"dynamic": "strict",
"properties": {
"name": {
"type": "keyword"
}
}
}
}
}
二、es7.x
{
"number_of_shards": "2",
"number_of_replicas": "2",
"max_result_window": 100000,
"analysis": {
"analyzer": {
"ik": {
"tokenizer": "ik_max_word"
}
}
},
"dynamic": "strict",
"properties": {
"name": {
"type": "text"
}
}
}
三、es7.13.2文章来源:https://www.toymoban.com/news/detail-727412.html
{
"number_of_shards": "2",
"number_of_replicas": "2",
"max_result_window": 100000,
"analysis": {
"analyzer": {
"ik": {
"tokenizer": "ik_max_word"
}
}
},
"mappings":{
"dynamic": "strict",
"properties": {
"name": {
"type": "text"
}
}
}
}
es7.13.2 新家字段文章来源地址https://www.toymoban.com/news/detail-727412.html
PUT index/_mapping
{
"properties":{
"a":{
"type":"keyword"
}
}
}
到了这里,关于es6.x和es7.x如何创建索引?的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!