How to add new node to clusters on different machines

How to add 2 shards/replica on two different boxes? I couldn't find any
good examples of doing it. Please point me the right direction or show me
some code.

Thanks in advance
Fei

--

Hey,

I'm afraid I did not understand your question.

In your title, you ask for "adding a new node". Just run a new instance of ES on
your new machine (on the same network) and ES will use it to spread shards.
In your comment, you ask to add 2shards/replica.
If you want to create a new index, just create it using the create index API:

http://www.elasticsearch.org/guide/reference/api/admin-indices-create-index.html
If you want to modify an existing index, just use the index update settings API:

http://www.elasticsearch.org/guide/reference/api/admin-indices-update-settings.html
but note that you can't change the shard number once the index has been created.
But, you can use aliases to answer to that need.

If I didn't answer to your question, could you please clarify what you are
after?

HTH
David.

Le 11 janvier 2013 à 06:40, Fei Yao mail2fei@gmail.com a écrit :

How to add 2 shards/replica on two different boxes? I couldn't find any good
examples of doing it. Please point me the right direction or show me some
code.

Thanks in advance
Fei

--

--
David Pilato
http://www.scrutmydocs.org/
http://dev.david.pilato.fr/
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

--

David,
First of all, I'm very new to the ES. I thought when I start a new instance
of ES on machine A, then I start another instance of ES on machine B.
Through some configuration B should know A's IP address. Such as when you
try to make a replset of MongoDB there is a config file you need to specify
all the ip address of the nodes which compose this cluster. Is this the
same with ES?

So, in other words. If I just run ./elasticsearch -f on machine A, then run
./elasticsearch -f on machine B. Through some black magic A and B's
elasticsearch instance automatically clustered? I saw some document on
elasticsearch's website. But I cannot find some example of how to cluster
elasticsearch on different boxes.

I hope I explain it well this time.
Thanks

On Friday, January 11, 2013 3:33:32 AM UTC-5, David Pilato wrote:

Hey,

I'm afraid I did not understand your question.

In your title, you ask for "adding a new node". Just run a new instance
of ES on your new machine (on the same network) and ES will use it to
spread shards.
In your comment, you ask to add 2shards/replica.
If you want to create a new index, just create it using the create index
API:
Elasticsearch Platform — Find real-time answers at scale | Elastic
If you want to modify an existing index, just use the index update
settings API:
Elasticsearch Platform — Find real-time answers at scale | Elastic
but note that you can't change the shard number once the index has been
created.
But, you can use aliases to answer to that need.

If I didn't answer to your question, could you please clarify what you
are after?

HTH
David.

Le 11 janvier 2013 à 06:40, Fei Yao <mail...@gmail.com <javascript:>> a
écrit :

How to add 2 shards/replica on two different boxes? I couldn't find any
good examples of doing it. Please point me the right direction or show me
some code.

Thanks in advance
Fei

--

--
David Pilato
http://www.scrutmydocs.org/
http://dev.david.pilato.fr/
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

--

Fei,

Look into Elasticsearch's discovery module, primarily Zen Discovery:

Nodes can find each other either by multicast or unicast (explicit IPs need
to be defined, similar to MongoDB). Both are disabled by default.

--
Ivan

On Fri, Jan 11, 2013 at 10:42 AM, Fei Yao mail2fei@gmail.com wrote:

David,
First of all, I'm very new to the ES. I thought when I start a new
instance of ES on machine A, then I start another instance of ES on machine
B. Through some configuration B should know A's IP address. Such as when
you try to make a replset of MongoDB there is a config file you need to
specify all the ip address of the nodes which compose this cluster. Is this
the same with ES?

So, in other words. If I just run ./elasticsearch -f on machine A, then
run ./elasticsearch -f on machine B. Through some black magic A and B's
elasticsearch instance automatically clustered? I saw some document on
elasticsearch's website. But I cannot find some example of how to cluster
elasticsearch on different boxes.

I hope I explain it well this time.
Thanks

On Friday, January 11, 2013 3:33:32 AM UTC-5, David Pilato wrote:

Hey,

I'm afraid I did not understand your question.

In your title, you ask for "adding a new node". Just run a new instance
of ES on your new machine (on the same network) and ES will use it to
spread shards.
In your comment, you ask to add 2shards/replica.
If you want to create a new index, just create it using the create index
API: Elasticsearch Platform — Find real-time answers at scale | Elastic**
indices-create-index.htmlhttp://www.elasticsearch.org/guide/reference/api/admin-indices-create-index.html
If you want to modify an existing index, just use the index update
settings API: Elasticsearch Platform — Find real-time answers at scale | Elastic**
indices-update-settings.htmlhttp://www.elasticsearch.org/guide/reference/api/admin-indices-update-settings.html
but note that you can't change the shard number once the index has been
created.
But, you can use aliases to answer to that need.

If I didn't answer to your question, could you please clarify what you
are after?

HTH
David.

Le 11 janvier 2013 à 06:40, Fei Yao mail...@gmail.com a écrit :

How to add 2 shards/replica on two different boxes? I couldn't find any
good examples of doing it. Please point me the right direction or show me
some code.

Thanks in advance
Fei

--

--
David Pilato
http://www.scrutmydocs.org/
http://dev.david.pilato.fr/
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

--

--

Ivan,
Wonderful, thanks for your help. I think I'm heading to the right direction.

Thanks

On Friday, January 11, 2013 1:50:51 PM UTC-5, Ivan Brusic wrote:

Fei,

Look into Elasticsearch's discovery module, primarily Zen Discovery:
Elasticsearch Platform — Find real-time answers at scale | Elastic

Nodes can find each other either by multicast or unicast (explicit IPs
need to be defined, similar to MongoDB). Both are disabled by default.

--
Ivan

On Fri, Jan 11, 2013 at 10:42 AM, Fei Yao <mail...@gmail.com <javascript:>

wrote:

David,
First of all, I'm very new to the ES. I thought when I start a new
instance of ES on machine A, then I start another instance of ES on machine
B. Through some configuration B should know A's IP address. Such as when
you try to make a replset of MongoDB there is a config file you need to
specify all the ip address of the nodes which compose this cluster. Is this
the same with ES?

So, in other words. If I just run ./elasticsearch -f on machine A, then
run ./elasticsearch -f on machine B. Through some black magic A and B's
elasticsearch instance automatically clustered? I saw some document on
elasticsearch's website. But I cannot find some example of how to cluster
elasticsearch on different boxes.

I hope I explain it well this time.
Thanks

On Friday, January 11, 2013 3:33:32 AM UTC-5, David Pilato wrote:

Hey,

I'm afraid I did not understand your question.

In your title, you ask for "adding a new node". Just run a new instance
of ES on your new machine (on the same network) and ES will use it to
spread shards.
In your comment, you ask to add 2shards/replica.
If you want to create a new index, just create it using the create
index API: Elasticsearch Platform — Find real-time answers at scale | Elastic**
indices-create-index.htmlhttp://www.elasticsearch.org/guide/reference/api/admin-indices-create-index.html
If you want to modify an existing index, just use the index update
settings API: Elasticsearch Platform — Find real-time answers at scale | Elastic*
*indices-update-settings.htmlhttp://www.elasticsearch.org/guide/reference/api/admin-indices-update-settings.html
but note that you can't change the shard number once the index has been
created.
But, you can use aliases to answer to that need.

If I didn't answer to your question, could you please clarify what you
are after?

HTH
David.

Le 11 janvier 2013 à 06:40, Fei Yao mail...@gmail.com a écrit :

How to add 2 shards/replica on two different boxes? I couldn't find any
good examples of doing it. Please point me the right direction or show me
some code.

Thanks in advance
Fei

--

--
David Pilato
http://www.scrutmydocs.org/
http://dev.david.pilato.fr/
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

--

--