- PHP Client: other versions:
- Overview
- Quickstart
- Installation
- Configuration
- Index Operations
- Indexing Operations
- Search Operations
- The Connection Pool
IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
Get Mappings API
edit
IMPORTANT: This documentation is no longer updated. Refer to Elastic's version policy and the latest documentation.
Get Mappings API
editThe Get Mappings API will return the mapping details about your indexes and types. Depending on the mappings that you wish to retrieve, you can specify a number of combinations of index and type:
// Get mappings for all indexes and types $ret = $client->indices()->getMapping(); // Get mappings for all types in 'my_index' $params['index'] = 'my_index'; $ret = $client->indices()->getMapping($params); // Get mappings for all types of 'my_type', regardless of index $params['type'] = 'my_type'; $ret = $client->indices()->getMapping($params); // Get mapping 'my_type' in 'my_index' $params['index'] = 'my_index'; $params['type'] = 'my_type' $ret = $client->indices()->getMapping($params); // Get mappings for two indexes $params['index'] = array('my_index', 'my_index2'); $ret = $client->indices()->getMapping($params);
Was this helpful?
Thank you for your feedback.