How to Get all mapping type of an index

Team is any way to get all Mapping type of an index ( only type ) not mapping definitions.

Hi All,
There is one idea :wink: , we can

  1. get all the documents
  2. grep _type field
  3. sort
  4. filter unique fields
    But i cann't retrive all documets via match_all query :cry: , is there any way to get all documents.

Hi all ,

here the simple way :blush:

you can use jq ( json parser )

curl -XGET http://IP:PORT/index_name/_mapping?pretty | jq '.[].mappings | to_entries[] | select(.key) |.key'

sure it will give all mappings on that index. worked for me :smile: