Skip to content

Mapping - MultiField Mapping #51

@kimchy

Description

@kimchy

Add another type multi_field for mapping to support mapping more than one core type. This is handy, for example, to map the same string type, once analyzed and one not_analyzed. For example:

{
    person : {
        properties : {
            "name" : {
                type : "multi_field",
                "fields" : {
                    "name" : {type: "string", index : "analyzed", store : "yes"},
                    "not_analyzed" : {type: "string", index : "not_analyzed"},
                }
            }
        }
    }
}

The above example, the name mapping is a multi field mapping. The name within the multi_field mapping is the "default" mapping (and used as if it was mapped regularly). The not_analyzed name is accessed through name.not_analyzed, and it won't be analyzed.

A special case is when merging, upgrading core type mapping into multi field mapping if the new mapping set for this property is now multi mapping.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions