Get certain fields in bulk API response

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Get certain fields in bulk API response

Jakko Sikkar
Hi,

I have a ES mapping with ES unique identifier (_id) and custom identifier. I need this custom indentifier to connect documents from ES index to database. Ok, so you think why I don't use this custom identifier as _id field. I can't replace ES identifier with this custom identifier because in database there can be multiple rows with this identifier. So now if I make bulk insert with 1000 objects I get the response with ES identifiers and I can't mark objects as indexed in database. Is there any possibility to get custom fields from bulk response or is there other solution that I don't see at the moment?

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/fd7e1c70-9374-4390-b31f-737a9ae04865%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Get certain fields in bulk API response

joergprante@gmail.com
You can send a term query after a bulk response, or you can implement your own bulk action, which returns the custom ID instead of _id.

Jörg

On Mon, Apr 27, 2015 at 9:55 AM, Jakko Sikkar <[hidden email]> wrote:
Hi,

I have a ES mapping with ES unique identifier (_id) and custom identifier. I need this custom indentifier to connect documents from ES index to database. Ok, so you think why I don't use this custom identifier as _id field. I can't replace ES identifier with this custom identifier because in database there can be multiple rows with this identifier. So now if I make bulk insert with 1000 objects I get the response with ES identifiers and I can't mark objects as indexed in database. Is there any possibility to get custom fields from bulk response or is there other solution that I don't see at the moment?

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/fd7e1c70-9374-4390-b31f-737a9ae04865%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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHpM7%3DFMXwuHNuKqvBw3aHMEGfCgBEsMmkE%3D8BBMbpgrA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Get certain fields in bulk API response

Jakko Sikkar
Thank you. Case closed :)

esmaspäev, 27. aprill 2015 11:14.12 UTC+3 kirjutas Jörg Prante:
You can send a term query after a bulk response, or you can implement your own bulk action, which returns the custom ID instead of _id.

Jörg

On Mon, Apr 27, 2015 at 9:55 AM, Jakko Sikkar <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="5MfI7XZeGBkJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">jakko....@...> wrote:
Hi,

I have a ES mapping with ES unique identifier (_id) and custom identifier. I need this custom indentifier to connect documents from ES index to database. Ok, so you think why I don't use this custom identifier as _id field. I can't replace ES identifier with this custom identifier because in database there can be multiple rows with this identifier. So now if I make bulk insert with 1000 objects I get the response with ES identifiers and I can't mark objects as indexed in database. Is there any possibility to get custom fields from bulk response or is there other solution that I don't see at the moment?

--
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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="5MfI7XZeGBkJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">elasticsearc...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/elasticsearch/fd7e1c70-9374-4390-b31f-737a9ae04865%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href='https://groups.google.com/d/msgid/elasticsearch/fd7e1c70-9374-4390-b31f-737a9ae04865%40googlegroups.com?utm_medium\75email\46utm_source\75footer';return true;" onclick="this.href='https://groups.google.com/d/msgid/elasticsearch/fd7e1c70-9374-4390-b31f-737a9ae04865%40googlegroups.com?utm_medium\75email\46utm_source\75footer';return true;">https://groups.google.com/d/msgid/elasticsearch/fd7e1c70-9374-4390-b31f-737a9ae04865%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';return true;">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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/709d8f7a-0d07-4176-ac01-c161d8eda99c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.