Searching across 2 nodes on 2 different servers

Please pardon my ignorance in advance, I'm new to Elasticsearch.

I have set up a cluster across two servers. One server is master and data,
the other just data.

Let's call my first server 'server1', my other server 'server2' and my
index 'address'.

If i want to search my address index, I can use the following URL:

http://server1:9200/address/_search

This returns data fine.

I can also use:

http://server2:9200/address/_search

and this returns data fine, too.

My query is as follows - Is there URL which I can use where Elasticsearch
chooses which server to return data from automatically, instead of having
to manually specify either server1 or server2?

I will be drastically increasing the number of indexes shortly and I'd like
Elasticsearch to automate which node it selects depending on whether the
other is in use, etc.

Is this possible?

Many thanks,
Phil.

--
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/6d95c9c0-ae71-4238-a8a7-2bdbca46c7c2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No, you need to hit an end point that points to a server and then ES handle
where to get the data.
You could setup a cname entry that round robins to each server, but that is
outside the scope of ES.

Regards,
Mark Walkom

Infrastructure Engineer
Campaign Monitor
email: markw@campaignmonitor.com
web: www.campaignmonitor.com

On 13 October 2014 20:35, Phil Morley philip.morley@gmail.com wrote:

Please pardon my ignorance in advance, I'm new to Elasticsearch.

I have set up a cluster across two servers. One server is master and data,
the other just data.

Let's call my first server 'server1', my other server 'server2' and my
index 'address'.

If i want to search my address index, I can use the following URL:

http://server1:9200/address/_search

This returns data fine.

I can also use:

http://server2:9200/address/_search

and this returns data fine, too.

My query is as follows - Is there URL which I can use where Elasticsearch
chooses which server to return data from automatically, instead of having
to manually specify either server1 or server2?

I will be drastically increasing the number of indexes shortly and I'd
like Elasticsearch to automate which node it selects depending on whether
the other is in use, etc.

Is this possible?

Many thanks,
Phil.

--
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/6d95c9c0-ae71-4238-a8a7-2bdbca46c7c2%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/6d95c9c0-ae71-4238-a8a7-2bdbca46c7c2%40googlegroups.com?utm_medium=email&utm_source=footer
.
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/CAEM624ZXhnugjJDEEkjzrghXOCGOijkAuWkE%2BX%2B9Q25dy8u-Yg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.