nest - how we decide in which node we should store document in elasticsearch? -
since new in es, need help.
i read possible specify shard document stored using 'routing'. possible restrict document should saved in particular node?..
suppose have 2 nodes. node1 , node2. requirement that, if add together document node1 index 'attenadance', should store primary shard @ node1 , replica may @ node2. , same thing if add together document node2 index 'attenadance', should store primary shard @ node2 , replica may @ node1...please advice me possible in es?..if yes, please tell how accomplish in es.
each node has specific value associated rack in cofig.yml. node 1 has setting node.rack: rack1, node 2 setting of node.rack: rack2, , on.
we can create index deploy on nodes have rack set rack1 setting index.routing.allocation.include.tag rack1. example:
curl -xput localhost:9200/test/_settings -d '{ "index.routing.allocation.include.tag" : "rack1" }'
further ref: elasticsearch official doc
elasticsearch nest
No comments:
Post a Comment