Alfresco re-indexing app requires a working Alfresco Repository Database and the Elasticsearch server.
The tool may be used as a standalone jar file. The table below lists the main configuration properties that can be specified through the Spring Boot configuration.
| Property | Description |
|---|---|
| server.port | Default HTTP port, each module defines itself. The default value is 8190. |
| alfresco.reindex.jobName | The data fetching strategy to use: reindexByIds, or reindexByDate. The default value is reindexByIds. |
| alfresco.reindex.batchSize | The batch size of documents inserted into Elasticesearch by the re-indexing app. The default value is 100. |
| alfresco.reindex.pagesize | The page size of nodes fetched from the Alfresco dabatase. The default value is 100. |
| alfresco.reindex.concurrentProcessors | Number of parallel processors. The default value is 10. |
| alfresco.reindex.fromId | Start ID for fetching nodes (reindexByIds). The default value is 0. |
| alfresco.reindex.toId | End ID for fetching nodes (reindexByIds) is configured. The default value is 20000000000. |
| alfresco.reindex.fromTime | Start time for fetching nodes (reindexByDate), pattern: yyyyMMddHHmm. The default value is 190001010000. |
| alfresco.reindex.toTime | End time for fetching nodes (reindexByDate), pattern: yyyyMMddHHmm. The default value is 203012312359. |
| spring.datasource.url | JDBC url of the Alfresco database. The default value is jdbc:postgresql://localhost:5432/alfresco. |
| spring.datasource.username | Username for the Alfresco database. The default value is alfresco. |
| spring.datasource.password | Password for the Alfresco database. The default value is alfresco. |
| spring.elasticsearch.rest.uris | Rest(s) url of Elasticsearch. The default value is http://elasticsearch:9200. |
| spring.elasticsearch.rest.username | Username for Elasticsearch when using Basic Authentication. |
| spring.elasticsearch.rest.password | Password for username in Elasticsearch when using Basic Authentication. |
| spring.activemq.broker-url | ActiveMQ Broker url, use async sending to improve performance. The default value is tcp://localhost:61616?jms.useAsyncSend=true. |
| spring.activemq.user | ActiveMQ Broker user. The default is admin. |
| spring.activemq.password | ActiveMQ Broker password. The default is admin. |
| alfresco.reindex.multithreadedStepEnabled | Enable steps to be executed in parallel threads. The default value is false. Multi-threaded steps is not compatible with retrying enabled. If retrying is enabled, the multi-thread settings are ignored. To use multi-threading, you need to set alfresco.reindex.retryingEnabled to false. |
| alfresco.reindex.retryingEnabled | Retry the execution of a step in case of fail. The default value is true. |
| alfresco.reindex.retryingMaxCount | Number of times to retry the step before throwing an error. The default value is 3. |
| alfresco.reindex.retryingInitialDelay | Waiting time before retrying the step in milliseconds. The default value is 1000. |
| alfresco.reindex.retryingDelayIntervalMultiplier | Every try should wait N times the initial delay, where N is the number specified in this property. The default value is 2. |
| alfresco.reindex.retryingMaxDelay | Maximum delay to be waited before executing a retry on a step. The default value is 30000. |
| alfresco.reindex.prefixes-file | File with namespaces-prefixes mapping. The default value is classpath:reindex.prefixes-file.json. |
| alfresco.reindex.partitioning.type | Remote node type, can be master or worker. If not specified, the app runs as a single node instance. By default it is left empty. |
| alfresco.reindex.partitioning.grid-size | Number of partitions, usually equals the number of available workers. The default value is 3. |
| alfresco.reindex.partitioning.requests-queue | Request queue for remote partitioning. org.alfresco.search.reindex.requests. |
| alfresco.reindex.partitioning.replies-queue | Reply queue for remote partitioning. org.alfresco.search.reindex.replies. |
| alfresco.db.minimum.schema.version | Minimum Alfresco Repository database version supported: 14002. |
| alfresco.accepted-content-media-types-cache.base-url | URL to get the list of Content Media Types supported. The default URL is http://localhost:8090/transform/config. |
| alfresco.accepted-content-media-types-cache.enabled | Cache the list of Content Media Types supported in memory. The default value is true. |
| alfresco.reindex.metadataIndexingEnabled | Re-index document metadata. The default value is true. |
| alfresco.reindex.contentIndexingEnabled | Re-index document content. The default value is true. |
| alfresco.reindex.pathIndexingEnabled | Re-index document Path property. The default value is false. |
There are two strategies to fill the gaps in the Elasticsearch server when provoked by ActiveMQ unavailability or any other external cause:
- Fetch by IDS alfresco.reindex.jobName=reindexByIds: index nodes in an interval of database ALF_NODE.id column
- Fetch by DATE alfresco.reindex.jobName=reindexByDate: index nodes in an interval of database ALF_TRANSACTION.commit_time_ms column
Sample invocation for Fetch by IDS.
Note: The x.x.x element in the name of the .jar file
represents the version number.
java -jar target/alfresco-elasticsearch-reindexing-x.x.x-app.jar \ --alfresco.reindex.jobName=reindexByIds \ --alfresco.reindex.pagesize=100 \ --alfresco.reindex.batchSize=100 \ --alfresco.reindex.fromId=1 \ --alfresco.reindex.toId=10000 \ --alfresco.reindex.concurrentProcessors=2
Sample invocation for Fetch by DATE.
Note: The x.x.x element in the name of the .jar file
represents the version number.
java -jar target/alfresco-elasticsearch-reindexing-x.x.x-app.jar \ --alfresco.reindex.jobName=reindexByDate \ --alfresco.reindex.pagesize=100 \ --alfresco.reindex.batchSize=100 \ --alfresco.reindex.concurrentProcessors=6 \ --alfresco.reindex.fromTime=202001010000 \ --alfresco.reindex.toTime=202104180000