WARNING: Version 1.5 of Elasticsearch has passed its EOL date.
This documentation is no longer being maintained and may be removed. If you are running this version, we strongly advise you to upgrade. For the latest information, see the current release documentation.
Multi-fields
editMulti-fields
editMulti-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.