What happens to data in an existing type if we update the mapping to specify 'path's for _id and _routing

We are using ES 1.3.2.
We have a need to specify custom id and routing values when indexing.
We've been doing this using Java APIs, however we would now like to update
the mapping to specify 'path's for _id and _routing.

The question we have is:

  1. Since this type already has a huge number of documents, can we change
    the mapping? When we tried it, we got a '"acknowledged": true' response,
    but it doesn't seem to be working when we tried indexing.
  2. In case there is a way to achieve this, will it affect only the new
    documents being indexed?

--
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/1c5516bd-7738-4969-8bee-b979aa89b65b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Any ideas on this?

On Monday, October 27, 2014 3:03:16 PM UTC+5:30, Preeti Raj - Buchhada
wrote:

We are using ES 1.3.2.
We have a need to specify custom id and routing values when indexing.
We've been doing this using Java APIs, however we would now like to update
the mapping to specify 'path's for _id and _routing.

The question we have is:

  1. Since this type already has a huge number of documents, can we change
    the mapping? When we tried it, we got a '"acknowledged": true' response,
    but it doesn't seem to be working when we tried indexing.
  2. In case there is a way to achieve this, will it affect only the new
    documents being indexed?

--
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/1b912d68-900f-4f6f-be5f-cbae83776e1b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

You can update a mapping (adding new fields or new sub fields)
Old documents won't be updated.

A common best practice is to reindex your data.

About specific fields like _routing and _id, I think that updating the mapping for them won't work so it will require to reindex.
Never tested it though.

--
David Pilato | Technical Advocate | elasticsearch.com
david.pilato@elasticsearch.com
@dadoonet | @elasticsearchfr | @scrutmydocs

Le 28 octobre 2014 à 08:13:04, Preeti Raj - Buchhada (pbuchhada@gmail.com) a écrit:

Any ideas on this?

On Monday, October 27, 2014 3:03:16 PM UTC+5:30, Preeti Raj - Buchhada wrote:
We are using ES 1.3.2.
We have a need to specify custom id and routing values when indexing.
We've been doing this using Java APIs, however we would now like to update the mapping to specify 'path's for _id and _routing.

The question we have is:

  1. Since this type already has a huge number of documents, can we change the mapping? When we tried it, we got a '"acknowledged": true' response, but it doesn't seem to be working when we tried indexing.
  2. In case there is a way to achieve this, will it affect only the new documents being indexed?

--
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/1b912d68-900f-4f6f-be5f-cbae83776e1b%40googlegroups.com.
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/etPan.544f43de.643c9869.1405c%40MacBook-Air-de-David.local.
For more options, visit https://groups.google.com/d/optout.