ArangoSearch Statistics HTTP API
The HTTP interface for ArangoSearch statistics is an observability feature that lets you inspect the index segments that back arangosearch Views and inverted indexes
Both arangosearch Views
and inverted indexes
store their data in ArangoSearch data stores. Every link of an
arangosearch View and every inverted index has its own data store, and each
data store is made up of immutable segments.
New segments are created by commits, and the background consolidation process
merges small segments into bigger ones and thereby removes documents that have
been marked as deleted, as governed by the
consolidation properties
of the View or inverted index.
The ArangoSearch statistics API lets you look at these segments to understand how a data store is laid out, how much of it is occupied by deleted documents, and whether consolidation keeps up with the write load.
Get the ArangoSearch statistics (experimental)
Introduced in: v3.12.11
The ArangoSearch statistics API is incomplete and thus an experimental
feature. It is only available on single servers, and the reported data
stores of arangosearch Views cannot be mapped back to the View they
belong to.
In v3.12.11, the endpoint reports the statistics of a single data store
that you cannot select, as a flat object without the numIndexes and
indexes attributes, and it returns an empty object if the database has
no arangosearch View and no inverted index.
Returns the summarized statistics and the per-segment information of the ArangoSearch data stores of the specified database.
The endpoint enumerates the collections of the database and reports the
statistics of every arangosearch View link and every inverted index it
encounters, identified by the name and type of the index as well as the
collection it belongs to. The order in which the data stores are
reported is not defined and can change. If the database has no
arangosearch View and no inverted index, then the list of data stores
is empty.
You need at least read access to the specified database.
200 OK
The statistics were returned successfully. The
indexesarray is empty if the database contains noarangosearchView and no inverted index.indexes array of objects
The list of ArangoSearch data stores of the database, each with its summarized statistics and per-segment information.
deletionRatio number
The share of documents that are marked as deleted, calculated as
(numDocs - numLiveDocs) / numDocsand rounded to two decimal places. It is0if the data store is empty. A high value indicates that the data store holds a lot of data that consolidation can still reclaim.Example:
0.17indexName string
The name of the index the data store belongs to.
- For
invertedindexes, this is the same as thenameof the index, which can be user-defined. - For the internal indexes of
arangosearchViews (links), this is an automatically generated name which cannot be mapped back to the View it belongs to.
Example:
"inv-idx"- For
Response Body application/json object
Examples
curl --header 'accept: application/json' --dump - http://localhost:8529/_arango/experimental/_db/_system/_admin/arangosearch/stats
Show output
{
"numIndexes": 2,
"indexes": [
{
"indexName": "idx_1780862094262272000",
"indexType": "arangosearch",
"collection": "coll",
"numDocs": 6,
"numLiveDocs": 5,
"deletionRatio": 0.17,
"numPrimaryDocs": 6,
"numSegments": 2,
"numFiles": 12,
"indexSize": 4118,
"segments": [
{
"name": "_1",
"numDocs": 5,
"numLiveDocs": 4,
"byteSize": 3562,
"deletionRatio": 0.2
},
{
"name": "_2",
"numDocs": 1,
"numLiveDocs": 1,
"byteSize": 556,
"deletionRatio": 0
}
]
},
{
"indexName": "inv-idx",
"indexType": "inverted",
"collection": "coll2",
"numDocs": 2,
"numLiveDocs": 2,
"deletionRatio": 0,
"numPrimaryDocs": 2,
"numSegments": 1,
"numFiles": 6,
"indexSize": 1247,
"segments": [
{
"name": "_1",
"numDocs": 2,
"numLiveDocs": 2,
"byteSize": 1201,
"deletionRatio": 0
}
]
}
]
}
