Elasticsearch and your Alfresco Upgrade

If you’re upgrading to or installing Alfresco Content Services (ACS) v6.x and you also use Alfresco Process Services (APS) for your Business Process Management, you’ll be using APS v1.11. While ACS search capabilities are powered by SOLR, APS uses Elasticsearch. However, in the current and future versions of APS, Elasticsearch is no longer embedded, so you’ll need to configure your own separate Elasticsearch instance. This process also requires an Elasticsearch rebuild. Elasticsearch does not automatically trigger a rebuild with a version update so this will need to be manually triggered. On a recent project, Blue Fish Group did this Elasticsearch build for our client. Here’s how we got it done.

How Elasticsearch Builds its Index

A new event data row (which is generated from user activities) will be added into a table called ‘ACT_EVT_LOG ‘ with the IS_PROCESSED flag set to 0. This event data is what Elasticsearch needs to begin building the index. A cron job will run every few minutes which scans for data where the IS_PROCESSED flag = 0 , and then it will start generating the Elasticsearch index with the configured Elasticsearch instance. As the index is built, the corresponding data will have its “IS_PROCESSED” flag set to ‘1’.

Next, a secondary cron job will run to move the processed data rows from ‘ACT_EVT_LOG” table to ‘PROCESSED_ACTIVITI_EVENTS’ table.

Now that we know how Elasticsearch builds its index, we can trigger a rebuild.

Rebuilding the Elasticsearch Index

This can be summarized into 2 steps:

  1. Export all the rows of table PROCESSED_ACTIVITI_EVENTS
  2. Import the exported rows from step 1 and updated the IS_PROCESSED flag to 0 from 1.

We created a script to assist us with the rebuild.

Our script first exports all the ‘processed events’ to a CSV. Next, our script parses that CSV and imports all the rows back into the ACT_EVT_LOG table with the IS_PROCESSED flag set to 0.

This is just a small sample of the types of issues you can encounter during your Alfresco upgrades. Contact us if you need expertise in upgrading your document management solution.  

Like this article?

Share on facebook
Share on Facebook
Share on twitter
Share on Twitter
Share on linkedin
Share on Linkedin
Share on pinterest
Share on Pinterest

© 2022 All rights reserved