Add REST endpoint for reindexing an index version
This performs reindexing of all documents for the complete index
version.
For example, reindex all documents in the changes index version 85:
POST /config/server/indexes/changes/versions/85/reindex
It is also supported to specify whether to reuse existing up-to-date
(non-stale) index documents:
POST /config/server/indexes/changes/versions/85/reindex
{"reuse": true}
This REST endpoint starts a background task and returns a response
immediately. Currently, the progress of reindexing can only be observed
in the server log.
Release-Notes: REST endpoint for reindex an index version
Change-Id: I5a30dad32d3a5c3fb6cbb7aa0a2cfa4eae62e212
diff --git a/Documentation/rest-api-config.txt b/Documentation/rest-api-config.txt
index 8d4aa96..148a4b5 100644
--- a/Documentation/rest-api-config.txt
+++ b/Documentation/rest-api-config.txt
@@ -1678,6 +1678,33 @@
}
----
+=== Reindex an Index Version
+--
+'POST /config/server/indexes/link:#index-name[\{index-name\}]/versions/#index-version[\{index-version\}]/reindex'
+--
+
+This endpoint allows to trigger background reindexing of an index version. It is
+also supported to specify whether to reuse existing up-to-date (non-stale) index
+documents.
+
+.Request
+----
+ POST /config/server/indexes/changes/versions/84/reindex HTTP/1.0
+ Content-Type: application/json; charset=UTF-8
+
+ {
+ "reuse": "true"
+ }
+----
+
+.Response
+----
+ HTTP/1.1 202 Accepted
+ Content-Type: application/json; charset=UTF-8
+
+ )]}'
+----
+
[[ids]]
== IDs