Skip to content

Stop passing around _type and _id in document source #1105

@MatMoore

Description

@MatMoore

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions