当前位置:网站首页>Es create a new index database and copy the old index library, practice pro test effective!
Es create a new index database and copy the old index library, practice pro test effective!
2020-11-06 21:40:00 【Architects who can drive】
Preface : Index library field encountered in project mapping The problem of mapping type mismatch , Need modification mapping Mapping type , So I thought about deleting the old mappings The redesign mappings Field type and copy data !
First step 、 Let's take a look at the old index library settings、mapping structure
GET /intpolicy/_mapping
GET /intpolicy/_settings?pretty
The second step 、 Take a look at the amount of data in the old index database and compare it after copying
GET /intpolicy/_search
The third step 、 Create a new index library Be careful settings、mapping Do not copy structure errors
PUT intpolicy?include_type_name=false
{
"settings" : {
"index" : {
"number_of_shards" : "1",
"provided_name" : "intpolicy",
"creation_date" : "1578638080477",
"analysis" : {
"analyzer" : {
"numanalyzer" : {
"pattern" : "|",
"type" : "pattern"
}
}
},
"number_of_replicas" : "0",
"uuid" : "cmouqXBLQiyFAJ5BNii8nw",
"version" : {
"created" : "6080599"
}
}
},
"mappings" : {
"_doc" : {
"properties" : {
"advanceTicketLatest" : {
"type" : "short"
},
"advantageType" : {
"type" : "keyword"
},
"arr" : {
"type" : "text"
}
}
}
}
}
The last step Copy the old index database data to the new index library
POST _reindex
{
"source": {
"index": "intpolicy2"
},
"dest": {
"index": "intpolicy"
}
}
版权声明
本文为[Architects who can drive]所创,转载请带上原文链接,感谢
边栏推荐
- 嘉宾专访|2020 PostgreSQL亚洲大会阿里云数据库专场:曾文旌
- The essence of transaction and the principle of deadlock
- Visual rolling [contrast beauty]
- A small goal in 2019 to become a blog expert of CSDN
- C calls SendMessage to refresh the taskbar icon (the icon does not disappear at the end of forcing)
- 消防器材RFID固定资产管理系统
- 2020-08-18:介绍下MR过程?
- Qt音视频开发46-视频传输UDP版
- 递归、回溯算法常用数学基础公式
- Can you do it with only six characters?
猜你喜欢
Introduction to the development of small game cloud
STM32F030K6T6兼容替换灵动MM32F031K6T6
Summary of common SQL statements
The Interpreter pattern of behavior pattern
Metersphere developer's Manual
Method of code refactoring -- Analysis of method refactoring
Description of phpshe SMS plug-in
An article will introduce you to CSS3 background knowledge
Vue communication and cross component listening state Vue communication
轻量型 GPU 应用首选 京东智联云推出 NVIDIA vGPU 实例
随机推荐
To teach you to easily understand the basic usage of Vue codemirror: mainly to achieve code editing, verification prompt, code formatting
Python basic variable type -- list analysis
Message queue - Analysis
The memorandum model of behavior model
An article taught you to download cool dog music using Python web crawler
ES中删除索引的mapping字段时应该考虑的点
Look! Internet, e-commerce offline big data analysis best practice! (Internet disk link attached)
Introduction to the development of small game cloud
An article will take you to understand SVG gradient knowledge
An article takes you to understand CSS gradient knowledge
Common syntax corresponding table of mongodb and SQL
An article will introduce you to HTML tables and their main attributes
Stickinengine architecture 11 message queue
Interviewer: how about shardingsphere
The 4th China BIM (digital construction) manager Summit Forum will be held in Hangzhou in 2020
Why is quicksort so fast?
超高频RFID医疗血液管理系统应用
嘉宾专访|2020 PostgreSQL亚洲大会阿里云数据库专场:曾文旌
ORA-02292: 违反完整约束条件 (MIDBJDEV2.SYS_C0020757) - 已找到子记录
STM32F030K6T6兼容替换灵动MM32F031K6T6