当前位置:网站首页>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 database technology conference helps technology upgrade
- All the way, I was forced to talk about C code debugging skills and remote debugging
- Stickinengine architecture 11 message queue
- Unexpected element.. required element
- 2020-08-18:介绍下MR过程?
- 磁存储芯片STT-MRAM的特点
- An article takes you to understand CSS3 picture border
- Road to simple HTML + JS to achieve the most simple game Tetris
- image operating system windows cannot be used on this platform
- To solve the problem that the data interface is not updated after WPF binding set
猜你喜欢
Zero basis to build a web search engine of its own
ES中删除索引的mapping字段时应该考虑的点
非易失性MRAM存储器应用于各级高速缓存
Exclusive interview of guests at | 2020 PostgreSQL Asia Conference: Wang Tao
Look! Internet, e-commerce offline big data analysis best practice! (Internet disk link attached)
To solve the problem that the data interface is not updated after WPF binding set
An article will take you to understand CSS3 fillet knowledge
The Interpreter pattern of behavior pattern
How does cglib implement multiple agents?
ES6 learning notes (3): teach you to use js object-oriented thinking to realize the function of adding, deleting, modifying and checking tab column
随机推荐
Introduction to the development of small game cloud
Stickinengine architecture 11 message queue
Some operations kept in mind by the front end foundation GitHub warehouse management
The 4th China BIM (digital construction) manager Summit Forum will be held in Hangzhou in 2020
How does filecoin's economic model and future value support the price of fil currency breaking through thousands
统计项目代码行数
An article will take you to understand CSS3 fillet knowledge
PHP application docking justswap special development kit【 JustSwap.PHP ]
CloudQuery V1.2.0 版本发布
image operating system windows cannot be used on this platform
Filecoin has completed a major upgrade and achieved four major project progress!
Event monitoring problem
2020-08-15:什么情况下数据任务需要优化?
Small program introduction to proficient (2): understand the four important files of small program development
DC-1 target
How much disk space does a file of 1 byte actually occupy
What is the tensor in tensorflow?
Open source a set of minimalist front and rear end separation project scaffold
With this artifact, quickly say goodbye to spam messages
Bitcoin once exceeded 14000 US dollars and is about to face the test of the US election