Multi-fields

edit

Multi-fields are dead! Long live multi-fields! Well, the field type multi_field has been removed. Instead, any of the core field types (excluding object and nested) now accept a fields parameter. It’s the same thing, but nicer. Instead of:

"title": {
    "type": "multi_field",
    "fields": {
        "title": { "type": "string" },
        "raw":   { "type": "string", "index": "not_analyzed" }
    }
}

you can now write:

"title": {
    "type": "string",
    "fields": {
        "raw":   { "type": "string", "index": "not_analyzed" }
    }
}

Existing multi-fields will be upgraded to the new format automatically.

Also, instead of having to use the arcane path and index_name parameters in order to index multiple fields into a single “custom _all field”, you can now use the copy_to parameter.