一、创建索引
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"
}
}
]
}
三、创建角色
四、创建用户