Alias for multiple indexes, why can't I use /indexname/doctype/docno?

We have an alias combining multiple indexes. Searching across the indexes via the alias and the _search endpoint is fine.

However, when referring to a document by its ID as a URI:

curl http://the-node:9200/the-alias/doc/123

we get the error:

"Alias [the-alias] has more than one indices associated with it [[the-index1, the-index2]], can't execute a single index op"

I can understand why you can't index via a multi-index alias, but why can't you get a document via a URI?

How does it know what document to get if there are multiple that match?

That makes sense. The way we're loading the indexes, the ids in one index will not overlap with ids in other indexes, so I didn't consider that.

Whereas, I guess, a search for a particular id will just return multiple documents if the same id was in multiple indexes.


Yeo GET isn't smart enough to reconcile or provide priority or anything, it's a basic operation designed for a single document :slight_smile:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.