Bulk index document with `_id` field inside

Hello,

We're trying to send raw string document to _bulk endpoint for bulk
indexing and this will save us json serialization/deserialization time.
But unfortunately in our document generation step, the custom _id field
is generated inside the document string. And this seems to break the bulk
endpoint.

{ "create" : { "_index" : "test", "_type" : "urls"} }
{ "url" : "abcde", "_id": 15 }  # our document structure

This does not works.

{ "create" : { "_index" : "test", "_type" : "urls", "_id": 15} }
{ "url" : "abcde"}

This works well.

Is there anyway we can send documents with _id fields inside?

Thanks.

--
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/fe22133a-a116-4b7a-854b-825b8fb1fe9e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No.

Jörg

On Wed, Dec 10, 2014 at 10:36 AM, Han JU ju.han.felix@gmail.com wrote:

Hello,

We're trying to send raw string document to _bulk endpoint for bulk
indexing and this will save us json serialization/deserialization time.
But unfortunately in our document generation step, the custom _id field
is generated inside the document string. And this seems to break the bulk
endpoint.

{ "create" : { "_index" : "test", "_type" : "urls"} }
{ "url" : "abcde", "_id": 15 }  # our document structure

This does not works.

{ "create" : { "_index" : "test", "_type" : "urls", "_id": 15} }
{ "url" : "abcde"}

This works well.

Is there anyway we can send documents with _id fields inside?

Thanks.

--
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/fe22133a-a116-4b7a-854b-825b8fb1fe9e%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/fe22133a-a116-4b7a-854b-825b8fb1fe9e%40googlegroups.com?utm_medium=email&utm_source=footer
.
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/CAKdsXoEyr_yDeW8K9ui8MnR%3Dkwo7-vkkHOn%2BOowe2O-%3DWXmcAw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.