Elasticsearch: Allow _meta in mappings on a field level

Created on 4 Apr 2013  路  5Comments  路  Source: elastic/elasticsearch

A mapping can have a _meta element - but it only keeps it if declared on the top level.
When using the _meta to annotate a mapping, or keeping custom configuration on it, or using it for some binding - a lot of times besides the top level you also need more custom data on a field level. So you need the mapping to keep also _meta nodes defined under fields.

discuss

Most helpful comment

Strongly requesting field-level meta, please!

All 5 comments

I'd rather avoid an explosion of meta fields - easy enough to store this in the type-level meta. Closing

Unfortunately this means you have to keep 2 things in sync, every time you add a field you have to modify the type meta. If you have multiple apps that can add fields you have consistency issues, type meta isn't versioned or "partial" updatable. Example: To add a field you only have to put the mapping of the 1 field and it will be merged, and optionally ignored if already there. Now to update meta you'll have to fetch, change, put.

So it isn't actually "easy" to use type meta.

+1

Strongly requesting field-level meta, please!

Yeah!! Looks like we are finally getting this in #49419

Was this page helpful?
0 / 5 - 0 ratings