cancel
Showing results for 
Search instead for 
Did you mean: 
angel-borroy
Employee
Employee

In ACS Enterprise 7.1 and newer versions, there are two types of search engines:

This blog post offers a tutorial on upgrading an existing ACS, utilizing Search Services (Solr), to a new ACS configured with Search Enterprise (OpenSearch or Elasticsearch). Keep in mind that deploying the product in production environments will necessitate additional configuration.

 

Steps of the process

  1. Prepare the source ACS deployment using Search Services (Solr)
  2. Prepare the Reindexing App for Search Enterprise (OpenSearch or Elasticsearch)
  3. Prepare the target ACS deployment using Search Enterprise (OpenSearch or Elasticsearch)
  4. Run the Reindexing App for Search Enterprise (OpenSearch or Elasticsearch)

 

1. Prepare source ACS

Gather information for every custom model defined

 

Custom Content Models can be defined in Alfresco using different options:

  • Upload a XML file with a model definition to Repository > Data Dictionary > Models folder in the repository. This node must have Model Active property enabled.
  • Create a new content model using the Model Manager tool available in Share web application. The action Activate should be enabled.
  • Apply an Alfresco addon that includes XML files with a content model definition

As the Content Store will be reused by the target ACS, it is necessary to identify only the content model definitions from Alfresco addons. Collect all the JAR or AMP files to apply them to the target ACS.

 

Build the namespaces and prefixes mapping file

 

The reindexing process requires a specific file, typically named reindex.prefixes-file.json. This file contains a mapping of namespaces and prefixes for content model definitions. Obtain this file by utilizing the Alfresco Repository addon available at model-ns-prefix-mapping. Deploy the addon and access the following URL to save the result as reindex.prefixes-file.json:

 

http://localhost:8080/alfresco/s/model/ns-prefix-map

 

This file will be user during the Reindexing process.

 

2. Prepare Reindexing App

Reindexing App is a command line Spring Boot application that can be dowloaded from Alfresco Nexus. Download alfresco-elasticsearch-reindexing-M.N.O-app.jar to a local folder and copy previously generated reindex.prefixes-file.json file to the same folder.

 

Identify the maximum number Id in ALF_NODE table. Typically, this can be obtained running a regular SQL sentence like the following one:

select max(id) from alf_node;

 

3. Prepare target ACS

Required services verification

 

Create a new ACS deployment that exposes following services:

  • Database should be accessible via JDBC protocol
  • ActiveMQ should be accesible via TCP protocol
  • Transform Service should be accessible via HTTP protocol
  • OpenSearch or Elasticsearch should be accesible via HTTP protocol

Storage configuration:

  • Database should be a replica of source ACS database
  • Content Store should be the same as source ACS

Remember to deploy in this environment all collected JAR or AMP files containing content model definitions from source ACS.

 

Create index in OpenSearch or Elasticsearch

 

Once this target ACS is up & ready (with the services and the addons applied), alfresco index must be created in OpenSearch or Elasticsearch. To trigger this creation process, access to ADW and click Search button.

 

4. Run Reindexing App

At this point, Reindeing App can be run to populate OpenSearch or Elasticsearch index in target ACS from command line.

java -jar alfresco-elasticsearch-reindexing-4.0.0-app.jar \--alfresco.reindex.jobName=reindexByIds \--alfresco.reindex.pagesize=100 \--alfresco.reindex.batchSize=100 \--alfresco.reindex.fromId=1 \--alfresco.reindex.toId=896 \--alfresco.reindex.concurrentProcessors=2 \--alfresco.accepted-content-media-types-cache.base-url=http://localhost:8095/transform/config \--spring.activemq.broker-url="tcp://localhost:61616?jms.useAsyncSend=true" \--spring.elasticsearch.rest.uris=http://localhost:9200 \--spring.datasource.url=jdbc:postgresql://localhost:5432/alfresco \--alfresco.reindex.prefixes-file=file:reindex.prefixes-file.json

Once the process is done, target ACS Repository contains an updated searching index and it's ready to be used.

 

Happy Enterprise searching!

 


* Support resources are available in https://github.com/aborroy/search-services-to-search-enterprise