GET /_all/_aliases always redirects to the master

In the documentation:
http://www.elasticsearch.org/guide/reference/api/admin-indices-aliases/

It says:
The get index alias api (Available since 0.90.1) allows to filter by alias
name and index name. This api redirects to the master and fetches the
requested index aliases, if available. This api only serialises the found
index aliases.

I have a cluster 3 ES instances, 2 workers and 1 master (which has no data).
For every search I first need to know which aliases map to which indices.
So I call te REST _aliases endpoint.

However this always get redirect to the master, which I don't want all this
traffic on.

So my question is:
Is there a way to get /_all/_aliases/ from one of the worker nodes?

Regards
Marc

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

Hi Marc,

Sadly no way right now. You could use the cluster state api to get that
info (it's under the metadata block) and support local=true for debugging
purposes:

curl -XGET
"http://localhost:9200/_cluster/state?filter_nodes=true&filter_routing_table=true&filter_blocks=true&local=true"

I'm curious as to you why you are concerned about the load. The get aliases
api is very light weight (unless you have a LOT of aliases). When calling
the master you are guarantied to get an up-to-date answer (at the price of
parallelism indeed). The rational was that these type of calls are
infrequent and administrative in nature.

Cheers,
Boaz

On Tuesday, July 9, 2013 1:53:59 PM UTC+2, Marc Goosen wrote:

In the documentation:
Elasticsearch Platform — Find real-time answers at scale | Elastic

It says:
The get index alias api (Available since 0.90.1) allows to filter by
alias name and index name. This api redirects to the master and fetches
the requested index aliases, if available. This api only serialises the
found index aliases.

I have a cluster 3 ES instances, 2 workers and 1 master (which has no
data).
For every search I first need to know which aliases map to which indices.
So I call te REST _aliases endpoint.

However this always get redirect to the master, which I don't want all
this traffic on.

So my question is:
Is there a way to get /_all/_aliases/ from one of the worker nodes?

Regards
Marc

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

Hi Marc,
I opened an issuehttps://github.com/elasticsearch/elasticsearch/issues/3345about adding the local flag to all the operations that get executed on the
master node (where it is currently missing). Once that's fixed you'll be
able to use the local flag in the get index alias api too in order to force
the local execution, something that's now possible with the cluster state
api like Boaz mentioned but not with the get index alias api.

Cheers
Luca

On Tuesday, July 9, 2013 4:12:04 PM UTC+2, Boaz Leskes wrote:

Hi Marc,

Sadly no way right now. You could use the cluster state api to get that
info (it's under the metadata block) and support local=true for debugging
purposes:

curl -XGET "
http://localhost:9200/_cluster/state?filter_nodes=true&filter_routing_table=true&filter_blocks=true&local=true
"

I'm curious as to you why you are concerned about the load. The get
aliases api is very light weight (unless you have a LOT of aliases). When
calling the master you are guarantied to get an up-to-date answer (at the
price of parallelism indeed). The rational was that these type of calls are
infrequent and administrative in nature.

Cheers,
Boaz

On Tuesday, July 9, 2013 1:53:59 PM UTC+2, Marc Goosen wrote:

In the documentation:
Elasticsearch Platform — Find real-time answers at scale | Elastic

It says:
The get index alias api (Available since 0.90.1) allows to filter by
alias name and index name. This api redirects to the master and
fetches the requested index aliases, if available. This api only serialises
the found index aliases.

I have a cluster 3 ES instances, 2 workers and 1 master (which has no
data).
For every search I first need to know which aliases map to which indices.
So I call te REST _aliases endpoint.

However this always get redirect to the master, which I don't want all
this traffic on.

So my question is:
Is there a way to get /_all/_aliases/ from one of the worker nodes?

Regards
Marc

--
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.
For more options, visit https://groups.google.com/groups/opt_out.