get-mapping.asciidoc 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. [[indices-get-mapping]]
  2. == Get Mapping
  3. The get mapping API allows to retrieve mapping definitions for an index or
  4. index/type.
  5. [source,js]
  6. --------------------------------------------------
  7. GET /twitter/_mapping/_doc
  8. --------------------------------------------------
  9. // CONSOLE
  10. // TEST[setup:twitter]
  11. [float]
  12. === Multiple Indices and Types
  13. The get mapping API can be used to get more than one index or type
  14. mapping with a single call. General usage of the API follows the
  15. following syntax: `host:port/{index}/_mapping/{type}` where both
  16. `{index}` and `{type}` can accept a comma-separated list of names. To
  17. get mappings for all indices you can use `_all` for `{index}`. The
  18. following are some examples:
  19. [source,js]
  20. --------------------------------------------------
  21. GET /_mapping/_doc
  22. GET /_all/_mapping/_doc
  23. --------------------------------------------------
  24. // CONSOLE
  25. // TEST[setup:twitter]
  26. If you want to get mappings of all indices and types then the following
  27. two examples are equivalent:
  28. [source,js]
  29. --------------------------------------------------
  30. GET /_all/_mapping
  31. GET /_mapping
  32. --------------------------------------------------
  33. // CONSOLE
  34. // TEST[setup:twitter]