(Realtime) GET request and multiple aliases

Hi,

when I try to GET an object via localhost:9200/myindex/mytype/1

but there are multiple indices associated with the alias 'myindex' I get
{"error":"ElasticSearchIllegalArgumentException[Alias [myindex] has more
than one index associated with it [[myindex1, myindex2]], can't execute a
single index op]","status":400}

How would you fix that?

Regards,
Peter.

--

routing=somehint

should fix it. thought this param is only available for indexing ...

--

In order to perform the get operation, elasticsearch needs to know exact
shard where the requested record is located. If an alias can be resolved
into multiple indices, it's not possible to determine which shard the
record belongs to, even if you specify a routing parameter. So, in order to
fix that, you need to replace alias with an index or with an alias that
resolves into a single index.

On Monday, November 12, 2012 10:10:36 AM UTC-5, Karussell wrote:

routing=somehint

should fix it. thought this param is only available for indexing ...

--

Ah, ok. thanks for the clarification!

--