close

Filter

loading table of contents...

Search Manual / Version 2110

Table Of Contents

3.5.3 Partial Reindexing of CAE Feeder Indices

You can make a CAE Feeder reindex selected contents by invoking JMX operation "reindexContent", "reindexByQuery", or "reindexByType" of MBean com.coremedia:type=CaeFeeder.

Reindexing can be expensive, if many contents are affected. It may block indexing of other repository changes. It can be used for example to reindex all content of a specific type after indexing rules for that type have been changed. To this end, the "reindexByType" JMX operation can be used.

The "reindexByQuery" operation is more generic and takes a Unified API query as documented in interface com.coremedia.cap.content.query.QueryService. All contents that match the query (and are not excluded from feeding) will be reindexed.

An alternative way to trigger a partial reindexing without directly performing JMX operations, is by using the reindex Spring Boot actuator endpoint at http://host:port/actuator/reindex. The provided handler accepts HTTP POST requests with an application/json body containing the following JSON valid fields: "ids", "contentTypes" and "query". The listed elements can be used in isolation or combined together to select the content needed to be re-indexed. For performance reasons the information sent are always merged together to form one single query execution. Others not recognized data are ignored by default.

The endpoint accepts JSON objects with at least one of the properties:

  • ids: single numerical content id or a comma-separated list of ids {"ids": 1234} or {"ids": "1234,5678"}

  • contentTypes: comma-separated list of doc-types {"contentTypes": "CMArticle,CMMedia"}

  • query: string containing a query in a format accepted by com.coremedia.cap.content.query.QueryService. When the query value is used in conjunction with contentTypes, the two are combined together and the type selection should be omitted from the value. The JSON {"query": "TYPE CMArticle : BELOW PATH '/Sites/Calista'"} and {"contentTypes": "CMArticle", "query": "BELOW PATH '/Sites/Calista'"} are retrieving the same contents.

When the fields are used together, the different values are joined by the logical OR inclusive operator. The following example {"ids": "1234,5678", "contentTypes": "CMArticle,CMMedia", "query": "BELOW PATH '/Sites/Calista'"} will generate a single query like "id=1234 OR id=5678 OR TYPE CMArticle,CMMedia: BELOW PATH '/Sites/Calista'". In case data are invalid or the request will result in a malformed query, a HTTP status code 500 will be returned to the client.

If the CAE Feeder is stopped during reindexing, it will continue with the next content after restart.

Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.