es 基于postman 删除、新增索引分析

符号 阅读:235 2021-03-31 13:29:48 评论:0

1、postman 删除es 指定索引

Delete请求 
http://192.168.1.10:9200/ucas_gis   #ucas_gis索引名称

2、postman 新增es 索引

Put 请求 
http://192.168.1.10:9200/ucas_gis  #ucas_gis索引名称

 

3、postman es 指定索引添加mapping 结构定义

Put 请求 
http://192.168.1.10:9200/ucas_gis/gisCertificate/_mapping 
# 其中ucas_gis 索引库   gisCertificate索引实体

请求参数mapping:

{ 
    "gisCertificate": { 
        "properties": { 
            "archTitle": { 
						"type": "text", 
						"fields": { 
							"keyword": { 
								"type": "keyword" 
							} 
						}, 
						"analyzer": "ik_max_word" 
					}, 
					"archiveYear": { 
						"type": "text", 
						"store": true, 
						"fields": { 
							"keyword": { 
								"type": "keyword" 
							} 
						} 
					}, 
					"assortNum": { 
						"type": "text", 
						"store": true, 
						"fields": { 
							"keyword": { 
								"type": "keyword" 
							} 
						} 
					}, 
					"createdDt": { 
						"type": "date" 
					}, 
					"devOrgName": { 
						"type": "text", 
						"fields": { 
							"keyword": { 
								"type": "keyword" 
							} 
						}, 
						"analyzer": "ik_max_word" 
					}, 
					"fieldName": { 
						"type": "text", 
						"store": true 
					}, 
					"fieldValue": { 
						"type": "text", 
						"fields": { 
							"keyword": { 
								"type": "keyword" 
							} 
						}, 
						"analyzer": "ik_max_word" 
					}, 
					"individualProjAdd": { 
						"type": "text", 
						"store": true, 
						"fields": { 
							"keyword": { 
								"type": "keyword" 
							} 
						}, 
						"analyzer": "ik_max_word" 
					}, 
					"individualProjName": { 
						"type": "text", 
						"fields": { 
							"keyword": { 
								"type": "keyword" 
							} 
						}, 
						"analyzer": "ik_max_word" 
					}, 
					"individualProjRefenceno": { 
						"type": "text", 
						"fields": { 
							"keyword": { 
								"type": "keyword" 
							} 
						}, 
						"analyzer": "ik_max_word" 
					}, 
					"organizationCode": { 
						"type": "text", 
						"store": true, 
						"fields": { 
							"keyword": { 
								"type": "keyword" 
							} 
						} 
					}, 
					"sid": { 
						"type": "text", 
						"fields": { 
							"keyword": { 
								"type": "keyword" 
							} 
						}, 
						"analyzer": "ik_max_word" 
					} 
             
        }  
    } 
}

 

声明

1.本站遵循行业规范,任何转载的稿件都会明确标注作者和来源;2.本站的原创文章,请转载时务必注明文章作者和来源,不尊重原创的行为我们将追究责任;3.作者投稿可能会经我们编辑修改或补充。

发表评论
搜索
KIKK导航

KIKK导航

排行榜
关注我们

一个IT知识分享的公众号