Indexing#
Indexing, i.e. filling and updating the search index, is triggered internally and is therefore not publicly accessible.
Reindex all documents#
One use case is to recreate the entire index. The mutation index
is used for this.
mutation {
index {
statusLine
}
}
Updating individual documents#
If new articles are created or updated in the CMS, they must also be created or updated in the index. This is also done via the mutation indexUpdate
. The paths of the resources to be updated are passed via an array.
mutation {
indexUpdate(["news/438237.php", "events/43212.php"]) {
statusLine
}
}
Get Indexing status#
While the indexer is indexing the documents, the current status can be queried using the query indexerStatus
. For example, to show how many documents have already been indexed.
query {
indexerStatus {
statusLine
}
}
Remove documents#
The mutation indexRemove
is used to remove documents from the index. The corresponding documents are removed from the index by specifying idList
, which is used to specify a list of resource IDs.
mutation {
indexRemove(idlist: ["438237", "43212"])
}
Abort indexing#
Indexing can be canceled. A check is made after each chunk as to whether the process should be aborted. The mutation indexAbort
is used to ensure that indexing is interrupted.
mutation {
indexAbort
}