一、创建索引
PUT bigxz_local_goods
{
"settings": {
"index": {
"number_of_shards": "3",
"number_of_replicas": "1"
},
"analysis": {
"analyzer": {
"my_analyzer": {
"tokenizer": "standard",
"filter":["my_delimiter","lowercase"]
}
},
"filter": {
"my_delimiter": {
"type":"word_delimiter",
"preserve_original":true
}
}
}
},
"mappings":{
"properties": {
"update_time": {
"type": "long"
},
"status": {
"type": "short"
},
"publish_type": {
"type": "short"
},
"goods_id": {
"type": "long"
},
"goods_name": {
"type": "text",
"analyzer": "my_analyzer"
},
"user_id": {
"type": "long"
},
"goods_addr": {
"type": "text",
"analyzer": "my_analyzer"
},
"expire_time": {
"type": "long"
},
"is_futures": {
"type": "short"
},
"is_multiple": {
"type": "short"
},
"origin_label": {
"type": "keyword"
},
"goods_title": {
"type": "text",
"analyzer": "my_analyzer"
},
"map_type": {
"type": "short"
},
"date": {
"type": "long"
},
"currency_name": {
"type": "keyword"
},
"pay_type": {
"type": "short"
}
}
}
}
二、索引设置别名
POST /_aliases
{
"actions": [
{
"add": {
"alias": "bigxz_as_goods_local",
"index": "bigxz_local_goods"
}
}
]
}
三、创建角色
文章来源:https://www.toymoban.com/news/detail-724171.html
四、创建用户
文章来源地址https://www.toymoban.com/news/detail-724171.html
到了这里,关于es 创建索引过程的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!