elasticsearch

get elasticsearch schema via commandline tool


I am trying to get up to speed on an elasticsearch implementation on a project. How can I see the data that is on the cluster? Is there a commandline tool that gives me information on the schema?


Solution

  • To get schema:

    curl -XGET 'http://loadtest-appserver1:9200/myIndex/_mapping'
    

    See Elasticsearch API documentation, specifically the Get Field Mapping API: /_mapping to "retrieve mapping definitions for one or more indices"