Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow LinkedMapWritable to include document meta fields like _version #261

Closed
mgreene opened this issue Sep 5, 2014 · 2 comments
Closed

Comments

@mgreene
Copy link

mgreene commented Sep 5, 2014

Currently, the LinkedMapWritable that comes into the mapper is purely the _source field from the response. It would be great if this data structure could also contain the _version.

In a write back scenario, with optimistic locking, I need to hit the GET API for each map input in order to get the _version field before I do a write back to ES. This of course adds O(n) operation for a data point that could come along with the initial stream.

Does this seem like a reasonable thing to add?

@mgreene mgreene changed the title Allow LinkedMapWritable to include document meta fields like version Allow LinkedMapWritable to include document meta fields like _version Sep 5, 2014
@costin
Copy link
Member

costin commented Oct 7, 2014

Hi,

This is now supported in master through es.read.metadata field - setting it to true will add the metadata under _metadata field (customizable) into the LinkedHashMap. Supported across integrations

@costin costin closed this as completed Oct 7, 2014
@mgreene
Copy link
Author

mgreene commented Oct 7, 2014

Wow that is awesome, thanks @costin !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants