🔍

Get Mapping

Verified

@elastic/get-mapping

Get field mappings for an index

Usage

RUN SKILL get_mapping()

With parameters:

RUN SKILL get_mapping WITH index_name = 'value'

Parameters

NameTypeDefaultDescription
index_nameSTRINGIndex name

Returns

DOCUMENT— A single document object

Example

-- Using curl
curl -u elastic-admin:elastic-password http://localhost:9200/_escript \
  -H "Content-Type: application/json" \
  -d '{"query": "RUN SKILL get_mapping()"}'

-- Response
{
  "result": [...],
  "_meta": {
    "execution_id": "abc123",
    "duration_ms": 45
  }
}