Get Facet Mapping
Returns the facet-specific field mapping for the {collection}.
This mapping includes only fields that are suitable for use in facet (group-by) searches. Not all fields in the regular mapping can be used for aggregation, so fields that are not aggregatable (e.g., large text fields, arrays) are excluded from the facet mapping.
Use this endpoint to discover which fields are available for grouping results in your search queries.
Path parameters
Type of the data collection.
The collection for which facet mapping should be retrieved.
Response
Facet 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"
}
}