Skip to main content

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:

ParameterTypeDescription
idstringDataset UUID or ownerId:slug natural id
Get the index mappingGET /api/datasets/admin:inventory-levels/mapping
The raw Elasticsearch mapping, keyed by index name. Answers {} when the Dataset has never been indexed.
Response · 200
{
"_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"
}
}
}
}
}
Captured from the API examples test suite; ids and timestamps are normalized.

Key Parts:

SectionDescription
_metaInformer's ownership stamp on the index (datasetId, systemId)
dynamic_templatesInformer's default type coercions (strings index as keyword + .text sub-field; numerics as float)
propertiesPer-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

Get index statusGET /api/datasets/admin:inventory-levels/index/status
Response · 200
{
"_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
}
}
]
}
}
Captured from the API examples test suite; ids and timestamps are normalized.

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

Get index document countGET /api/datasets/admin:inventory-levels/index/count
Response · 200
3
Captured from the API examples test suite; ids and timestamps are normalized.

GET /api/datasets/{id}/index/size

Get the index size in bytes. The response body is the bare number.

Authentication: Required

Get index size in bytesGET /api/datasets/admin:inventory-levels/index/size
Response · 200
6292
Captured from the API examples test suite; ids and timestamps are normalized.

DELETE /api/es-index/{id}

Delete a search index by name (admin operation).

Authentication: Required

Permission: Superuser

Path Parameters:

ParameterTypeDescription
idstringFull index name (URL-encode it; index names contain dots)
Delete a search index (superuser)DELETE /api/es-index/docsex.acme.temp-import-a.1700000000000
Deletes the index and clears esIndex/records/size on any Dataset that pointed at it; the Dataset row itself survives. 404 when no such index exists. Responds 200 with an empty body.
Response · 200 · no body
Captured from the API examples test suite; ids and timestamps are normalized.

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, and size cleared; the Dataset row itself survives and can be refreshed again
  • 404 when no index by that name exists; 200 with an empty body on success
Administrative Operation

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:

FieldTypeRequiredDescription
indicesarrayYesIndex names to delete
Delete several search indexes (superuser)POST /api/vacuum-es-indices
Same effect as the single delete, for a batch of index names. Responds 200 with an empty body.
Request body
{
"indices": [
"docsex.acme.temp-import-b.1700000000000"
]
}
Response · 200 · no body
Captured from the API examples test suite; ids and timestamps are normalized.

Behavior:

  • Same per-index effect as DELETE /api/es-index/{id}, applied sequentially
  • 404 if any named index does not exist (indices earlier in the list are already deleted at that point)
  • 200 with an empty body on success

Use Case:

Batch cleanup of orphaned indices identified by the vacuum report.