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

Stop passing around _type and _id in document source #1105

Open
MatMoore opened this issue Dec 18, 2017 · 0 comments
Open

Stop passing around _type and _id in document source #1105

MatMoore opened this issue Dec 18, 2017 · 0 comments
Labels

Comments

@MatMoore
Copy link
Contributor

From https://trello.com/c/y4ckV2Qt/18-stop-passing-around-type-and-id-in-document-source

The _type and _id fields have been removed from the document source in PR 824. The Rummager code still adds them to the document hash as a convenient (but confusing) way of passing the type and id around with the rest of the document.

Example in amender.rb, we still add _type and _id to the document _source:

      # For backwards-compatibility, ensure that the source _type and _id are
      # the same as the main Elasticsearch _type and _id
      document_source["_type"] = raw_document["_type"]
      document_source["_id"] = raw_document["_id"]

Can we separate _type and _id from the rest of the document fields so they don't look like fields which will be stored in the source in Elasticsearch?

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

No branches or pull requests

1 participant