当前位置:网站首页>Mapping index attribute & operation of creating index
Mapping index attribute & operation of creating index
2022-07-19 06:34:00 【Its natural happy clothes】
One . mapping Index attribute
Two . Operation of index library
1. Create index library
example :
# Create index library
PUT /heima
{
"mappings": {
"properties": {
"info": {
"type": "text",
"analyzer": "ik_smart"
},
"email": {
"type": "keyword",
"index": false
},
"name": {
"type": "object",
"properties": {
"firstname": {
"type": "keyword"
},
"lastname": {
"type": "keyword"
}
}
}
}
}
}
2. Other operations of the index library ( see , Delete , modify ( Only new fields can be added )):
ps: After the index library is created
Theoretically, it can be modified
But in actual development , yes No modification Of the original field ( But you can add new fields ), Because the revision will The impact on performance is great Of , It may make the whole library unavailable
( example ) Code :
# Inquire about
GET /heima
# Modify the index library , Add new fields
PUT /heima/_mapping
{
"properties": {
"age": {
"type": "integer"
}
}
}
# Delete
DELETE /heima
边栏推荐
猜你喜欢
基于运动和视觉突出性的自我视频中的注意预测
机器人缝合手势识别和分类
Introduction to easydarawin streaming media server
数据库的查询(二)
Visual saliency based visual gaze estimation
Learning non posture gaze deviation with head movement
日常的眼睛接触检测使用无监督的注视目标发现
[force buckle] realize stack with queue
用头部运动学习无姿态注视偏差
Robot stitching gesture recognition and classification
随机推荐
Introduction to basic knowledge of Minio
人脸识别错误
视图、索引文件的应用
【力扣】二叉树的最大深度
XOR gun (bit operation, thinking, interval violence)
山西省第二届网络安全技能大赛(企业组)部分赛题WP(二)
SalGaze:使用视觉显著性的个性化注视估计
【力扣】用栈实现队列
Ehab the Xorcist (异或性质,构造)
Peerless good problem (bit operation optimization DP)
ACWing每日一题.3511
[force buckle] flip binary tree
[bjoi2019] platoon formation (Group backpack)
Vscode Tips 1
2022/07/09 group 5 Ding Shuai's study notes day02
Markdown语法和常用快捷键
LeetCode树
Perceive the attention status of users on smart phones
Decorate Apple Tree
Qtss data type