Storing auto generated _id under different name

Is it possible to have the _id be auto-generated and store it so that it's
in the _source field under a different name, like say "id" instead of "_id"?

--
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/1eb03930-64c8-44ac-9f69-7ad2ff6b563e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No, it isn't possible.

Why would you like to have the id of the document included in _source?

On Tue, Jun 17, 2014 at 8:16 PM, Johny Lam johny.lam@gmail.com wrote:

Is it possible to have the _id be auto-generated and store it so that it's
in the _source field under a different name, like say "id" instead of "_id"?

--
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/1eb03930-64c8-44ac-9f69-7ad2ff6b563e%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/1eb03930-64c8-44ac-9f69-7ad2ff6b563e%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
Adrien Grand

--
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/CAL6Z4j4bXnVGEmu%3D6Qwz3fgaZKvDOJicGqLLf1VakX%3Dpq6oFvw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

I'm using elasticsearch as the database for a service. It would make things
easier. For example, I could just return the _source field when other apps
query my service. Related to that is that on the javascript client side, I
am inserting the _id field into the _source JSON object as "id" and using
that as the model for two way data-binding. If the id field was in the
source already, I wouldn't have to keep track of this.

On Tuesday, June 17, 2014 4:26:07 PM UTC-7, Adrien Grand wrote:

No, it isn't possible.

Why would you like to have the id of the document included in _source?

On Tue, Jun 17, 2014 at 8:16 PM, Johny Lam <john...@gmail.com
<javascript:>> wrote:

Is it possible to have the _id be auto-generated and store it so that
it's in the _source field under a different name, like say "id" instead of
"_id"?

--
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 elasticsearc...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/1eb03930-64c8-44ac-9f69-7ad2ff6b563e%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/1eb03930-64c8-44ac-9f69-7ad2ff6b563e%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
Adrien Grand

--
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/a1b9d878-47cc-4e06-ae02-0b32375cf3bc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.