You can search using _routing and give a document id as the routing key.
--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr
Le 13 mars 2014 à 07:21:33, Nitesh Earkara (enitesh@gmail.com) a écrit:
Thanks David.
Is there any command to check what data is present in each shard?
On 13 March 2014 11:27, David Pilato david@pilato.fr wrote:
Answered inline.
--
David
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
Le 13 mars 2014 à 06:50, Nitesh Earkara enitesh@gmail.com a écrit :
Hi,
I have some basic understanding that shards are distributed across nodes and there will be replicas for each shard (assuming replica are set up for each shard). Also that shard and its replica will never exist on same node.
I have few questions to clear my concepts on shards and replicas
-
How does ES divide the data across shards? How does it divide what data/ how much data should it go to each shard?
Using a routing value (default is _id) which is hashed and we compute a modulo based on #of shards.
-
Does one shard know what data is present in other shard?
No.
-
If new data gets added to an index/type,how does it decide into which shard the data should go? Does this happen instantaneously or some indexing or crawling occur at regular intervals after which data gets added to the shard?
I explained it with answer 1.
It's at index time.
-
How data is synchronized between replica and shard? If data is added to shard, how long will it take for it to appear in replica?
Immediatly by defaut. When you get the response back, you know that your doc is on every shard it should be.
On Wednesday, January 15, 2014 10:08:17 PM UTC+5:30, David Pilato wrote:
It depends.
When you have no replica allocated (default with only one node), then replica is first copied over the network and then transaction log is replayed for remaining operations.
When the replica is allocated, each operation (transaction log) is replayed on each replica.
About terminology, we don't speak about "replica nodes" but "replica shards". Index is split into shards. Shards are allocated on nodes. A shard can be a primary or a replica. So on a given node, you can have primary shards or replica shards. It does not really matter.
Makes sense?
--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr
Le 15 janvier 2014 at 16:54:59, Gianluca Bassini (kod...@gmail.com) a écrit:
I'm curious about elasticsearch cluster architecture and I didn't find any documentation about it.
In particulary I'm interested about how replica nodes works, replica node receive operation log from master and performe the same operation (like in mongodb replica set) or the replica copy the delta chunk from the master like solr
Thanks in advance
Gianluca
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 elasticsearch+unsubscribe@googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/elasticsearch/XoAHAgK_G8g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/746A55B4-5730-4765-9903-7B53A2EE60EB%40pilato.fr.
For more options, visit https://groups.google.com/d/optout.
--
Thanks & Regards,
Nithesh Erakkara
enitesh@gmail.com
+919833742684
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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAOkk-nYArZR01cwZ%2B2tmYq9LfF9vhROOQo3Uvo%3DjRkDbGx9xtQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/etPan.53215e33.6b8b4567.158d%40MacBook-Air-de-David.local.
For more options, visit https://groups.google.com/d/optout.