Mapping & Index Management
Inspect the search index behind a Dataset, and administratively remove orphaned indices.
GET /api/datasets/{id}/mapping
Get the index mapping for the Dataset.
Authentication: Required
Path Parameters:
| Parameter | Type | Description |
|---|---|---|
id | string | Dataset UUID or ownerId:slug natural id |
{
"_links": {
"self": {
"href": "https://informer.example.com/api/datasets/admin%3Ainventory-levels/mapping"
}
},
"_meta": {
"datasetId": "00000000-0000-4000-8000-000000000001",
"systemId": "00000000-0000-4000-8000-000000000002"
},
"dynamic_templates": [
{
"string_as_keyword": {
"match_mapping_type": "string",
"mapping": {
"fields": {
"text": {
"type": "text"
}
},
"ignore_above": 256,
"type": "keyword"
}
}
},
{
"double_to_float": {
"match_mapping_type": "double",
"mapping": {
"type": "float"
}
}
},
{
"long_to_float": {
"match_mapping_type": "long",
"mapping": {
"type": "float"
}
}
}
],
"properties": {
"onHand": {
"type": "float"
},
"product": {
"type": "keyword",
"ignore_above": 256,
"fields": {
"text": {
"type": "text"
}
}
},
"reorderAt": {
"type": "float"
},
"sku": {
"type": "keyword",
"ignore_above": 256,
"fields": {
"text": {
"type": "text"
}
}
}
}
}
Key Parts:
| Section | Description |
|---|---|
_meta | Informer's ownership stamp on the index (datasetId, systemId) |
dynamic_templates | Informer's default type coercions (strings index as keyword + .text sub-field; numerics as float) |
properties | Per-field index types |
Answers {} when the Dataset has never been indexed.
Use Case:
Debugging search behavior: the mapping is the ground truth for how each field is indexed, sorted, and searched.
GET /api/datasets/{id}/index/status
Get the index's shard recovery status (the raw Elasticsearch
indices.recovery payload, keyed by index name).
Authentication: Required
{
"_links": {
"self": {
"href": "https://informer.example.com/api/datasets/admin%3Ainventory-levels/index/status"
}
},
"docsex.acme.inventory-levels.1700000000000": {
"shards": [
{
"id": 0,
"type": "EMPTY_STORE",
"stage": "DONE",
"primary": true,
"start_time_in_millis": 1700000000000,
"stop_time_in_millis": 1700000000000,
"total_time_in_millis": 20,
"source": {},
"target": {
"id": "xKGDDOQJTjmfkyqdAgqqNg",
"host": "172.20.0.2",
"transport_address": "172.20.0.2:9300",
"ip": "172.20.0.2",
"name": "87d1ec9ac8ec"
},
"index": {
"size": {
"total_in_bytes": 0,
"reused_in_bytes": 0,
"recovered_in_bytes": 0,
"recovered_from_snapshot_in_bytes": 0,
"percent": "0.0%"
},
"files": {
"total": 0,
"reused": 0,
"recovered": 0,
"percent": "0.0%"
},
"total_time_in_millis": 20,
"source_throttle_time_in_millis": 0,
"target_throttle_time_in_millis": 0
},
"translog": {
"recovered": 0,
"total": 0,
"percent": "100.0%",
"total_on_start": 0,
"total_time_in_millis": 20
},
"verify_index": {
"check_index_time_in_millis": 0,
"total_time_in_millis": 20
}
}
]
}
}
Each shard entry reports its recovery type, stage (DONE when fully
recovered), and per-phase progress. This is operational detail; for simple
"how big / how many" questions use the count and size endpoints below.
GET /api/datasets/{id}/index/count
Get the number of documents in the Dataset's index. The response body is the bare number.
Authentication: Required
3
GET /api/datasets/{id}/index/size
Get the index size in bytes. The response body is the bare number.
Authentication: Required
6292
DELETE /api/es-index/{id}
Delete a search index by name (admin operation).
Authentication: Required
Permission: Superuser
Path Parameters:
| Parameter | Type | Description |
|---|---|---|
id | string | Full index name (URL-encode it; index names contain dots) |
Behavior:
- Deletes the index, including flow-step scratch indices that have not expired yet
- Any Dataset pointing at the index has its
esIndex,esType,records, andsizecleared; the Dataset row itself survives and can be refreshed again 404when no index by that name exists;200with an empty body on success
This bypasses Dataset-level permissions and deletes index data directly. Deleted indices cannot be recovered (refresh rebuilds Datasource-backed Datasets, but inline/upload data is gone).
POST /api/vacuum-es-indices
Delete multiple search indices in one call (admin operation).
Authentication: Required
Permission: Superuser
Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
indices | array | Yes | Index names to delete |
{
"indices": [
"docsex.acme.temp-import-b.1700000000000"
]
}
Behavior:
- Same per-index effect as
DELETE /api/es-index/{id}, applied sequentially 404if any named index does not exist (indices earlier in the list are already deleted at that point)200with an empty body on success
Use Case:
Batch cleanup of orphaned indices identified by the vacuum report.