简体   繁体   中英

migrate indexes from old version of elasticsearch to elasticsearch 7.9

we want to upgrade our elasticsearch version from 5.6 to 7.9 in our project.

I have to migrate our indexes and docs to new version but I cant use reindex , So I rest high level client to connect to elasticsearch 7 and use http request for elasticsearch 5.

For migration I get part of docs with match_all query and scroll from old version and index them in new elasticsearch with bulk request.

our old version elasticsearch has 3 node. My question is that I have to send request to all node separately and process docs or if I send match_all query search to one node it will be handled by elsaticsearch (I read sth about cordinating node that handle requests and Every node is implicitly a coordinating node cordinating node .) or I have to send request to data node

When you start a cluster of elsticsearch you can see all of the cluster as a single data base. it means that you can fetch and insert to all of the cluster by sending your request to one of them. You just need to send your request to a node and fetch your data.

Adding more details to @saeednasehi answer, Looks like you are getting confused about how Elasticsearch and its queries work internally, please refer to my answer to how search queries works in elasticsearch .

Apart from this while it's true, you can get data by connecting to any node, but in your ES client(JHLRC or HTTP) you should mention all the nodes IP, so that your request(note coordinating) load is distributed among all the data nodes, if you just give one node-IP, than that node always acts as a co-ordinating node in absence of dedicated coordinating node(default).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM