Updating a document in an aliased index collection

Hi,

the task is to update a document which lays in one of serveral indices (all
of them with the same alias).

I cannot feed when using the alias (pointing to multiple indices) - this
makes sense, but why is the update API not working? Couldn't ElasticSearch
get the concrete index as well as the document when searching and then use
that to do the update?

The problem behind this task is that one index gets bigger and we want to
split it in the near future to improve feeding time. But when we would feed
into only one index then ElasticSearch will create a new document even if
it exists in another index.

Regards,
Peter.

--

During update elasticsearch doesn't search for a document, it "gets" the
document instead. That's why it needs to know exactly where document is
located. What you are describing sounds like a special use case of Update
by Query https://github.com/elasticsearch/elasticsearch/issues/1607
request.

On Thursday, November 15, 2012 7:07:07 AM UTC-5, Karussell wrote:

Hi,

the task is to update a document which lays in one of serveral indices
(all of them with the same alias).

I cannot feed when using the alias (pointing to multiple indices) - this
makes sense, but why is the update API not working? Couldn't ElasticSearch
get the concrete index as well as the document when searching and then use
that to do the update?

The problem behind this task is that one index gets bigger and we want to
split it in the near future to improve feeding time. But when we would feed
into only one index then ElasticSearch will create a new document even if
it exists in another index.

Regards,
Peter.

--

I cannot feed when using the alias (pointing to multiple indices) - this
makes sense, but why is the update API not working? Couldn't ElasticSearch
get the concrete index as well as the document when searching and then use
that to do the update?

Until the "update by query" API is available, couldn't you just search
for the document you want to update, using the alias, the type, and an ID,
and then just use the regular AP? Because ES returns the "original",
non-aliased index name in the response.

Karel

--

Hey, thank you both. Yes, searching is an option. I hoped to avoid somehow
the fetching to the client.

Peter.

On Monday, November 19, 2012 3:31:09 PM UTC+1, Karel Minařík wrote:

I cannot feed when using the alias (pointing to multiple indices) - this

makes sense, but why is the update API not working? Couldn't ElasticSearch
get the concrete index as well as the document when searching and then use
that to do the update?

Until the "update by query" API is available, couldn't you just search
for the document you want to update, using the alias, the type, and an ID,
and then just use the regular AP? Because ES returns the "original",
non-aliased index name in the response.

Karel

--