What I was referring to was shard routing, not document routing. I admit
that document routing is more prominent.

Shard routing is explained here
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/index-modules-allocation.html

Here is a little recipe for what you want to achieve

- assume a simple cluster of node N1 and node N2, where N1 is for indexing
and N2 is for search
- tag the nodes in the config with node.tag: "index" on N1 (optionally set
node.tag: "search" on N2)
- now the first indexing round:
- create index A1 with shard routing attribute "index" and replica level 0.
Example
curl -XPUT localhost:9200/a1/_settings -d '{
    "index.routing.allocation.include.tag" : "index",
    "index.number_of_replicas" : 0
}'
- feed documents into index A1, connect only to N1 with the client
- allow replica to disseminate to all nodes. Example
curl -XPUT localhost:9200/a1/_settings -d '{
      "index.routing.allocation.include.tag" : "*"
}'
- set replica level 1 to index A1, ES is doing the shard copy automatically
- create index alias A pointing to index A1
- search on index A on replica only with "only_node:N2"
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-preference.html

- preferably, search clients should only connect to N2
- now, how to perform more indexing rounds when A1 is in use on both nodes?
Start over again but with a second index:
- create index A2 with shard routing attribute "index" and replica level 0
- feed documents into index A2, connect only to N1 with the client
- allow replica to disseminate to all nodes
- set replica level 1 to index A2, ES is doing the shard copy automatically
- now, modify index alias A regarding the new index. For example, for a
switchover, remove A1 and add A2. This is done atomically.

A1 and A2 can either be full updates or incremental. How this should be
reflected in search is managed by index aliasing with A. After a switchover
from A1 to A2, A1 can be dropped.

N1 and N2 can also be extended to a group of nodes for indexing and
searching.

Jörg

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHsM4BePXu3J7cqoLMvGy5Y04_NPsEb0trHJ4Q79bd9Wg%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to