Get Mapping
Returns the field mapping for the default index in the {collection}.
Use this mapping to understand which fields are available and how they are typed, so you can craft precise search queries using Lucene Query Syntax.
Each field or subfield will include either a field_type or children property:
- A field_type indicates that the field is a leaf node in the mapping tree.
- A children property indicates a parent field that contains nested fields.
Example:
{
"leaf": {
"field_type": "type"
},
"parent": {
"children": [
{
"leaf": {
"field_type": "type"
}
}
]
}
}
❗️__Note__: This endpoint returns the search mapping, which may slightly differ from the structure of actual search results. Refer to the response examples for each data collection to see how fields are represented in real-world data.
Path parameters
Type of the data collection.
The collection for which mapping should be retrieved.
Response
Field Mapping
A compact recursive representation of the search mapping. Each top-level key is a field name. Leaf fields contain field_type. Parent fields contain children, where each item is an object with a single nested field name mapped to another generic mapping node.
Example response
{
"http": {
"category": "protocols",
"children": [
{
"headers": {
"children": [
{
"content_type": {
"field_type": "keyword"
}
}
]
}
}
]
},
"ip": {
"category": "addressing",
"field_type": "ip"
}
}