meta.asciidoc 775 B

12345678910111213141516171819202122232425262728293031
  1. [[mapping-field-meta]]
  2. === `meta`
  3. Metadata attached to the field. This metadata is opaque to Elasticsearch, it is
  4. only useful for multiple applications that work on the same indices to share
  5. meta information about fields such as units
  6. [source,console]
  7. ------------
  8. PUT my_index
  9. {
  10. "mappings": {
  11. "properties": {
  12. "latency": {
  13. "type": "long",
  14. "meta": {
  15. "unit": "ms"
  16. }
  17. }
  18. }
  19. }
  20. }
  21. ------------
  22. // TEST
  23. NOTE: Field metadata enforces at most 5 entries, that keys have a length that
  24. is less than or equal to 20, and that values are strings whose length is less
  25. than or equal to 50.
  26. NOTE: Field metadata is updatable by submitting a mapping update. The metadata
  27. of the update will override the metadata of the existing field.