Monday, October 10, 2022

Control indexing in Alfresco with Alfresco Search Services

I came acorss a query from a friend to disable content indexing and allow only matadata indexing recently. The last time i tried this when i was using Alfresco 5.0 with Solr4. This time i tried with Alfresco Content Services 7.2.0.1 and Alfresco Search Services 2.0.3.5 and the good news is that, it still works. 

If your application does not require full-text content search capability, then disabling content indexing comes handy and increases the performance as well.

If you are curious to try out, then follow along.

Pre-requisites
  • You have an environment up and running with Alfresco Content Services 7.x and Alfresco Search Services 2.x (Solr6)
  • You have administrative privileges

Looking for Alfresco Content Services 7.x with Alfresco Search Services 2.x installation steps? , checkout these posts:




Content and metadata are indexed by default, it is out-of-the-box behavior. There are two ways you can control content/metadata indexing behavior in order to fulfil the search and indexing requirements. We will go over both options.

Control indexing behavior with help of content model aspect:


To control the indexing behavior, you can make use of a content model aspect named "cm:indexControl" which has two properties. These properties indicate whether content/metadata should be indexed.

The value of these properties are set to true by default.

<aspect name="cm:indexControl">
	<title>Index Control</title>
	<properties>
		<property name="cm:isIndexed">
			<title>Is indexed</title>
			<type>d:boolean</type>
			<default>true</default>
		</property>
		<property name="cm:isContentIndexed">
			<title>Is content indexed</title>
			<type>d:boolean</type>
			<default>true</default>
		</property>
	</properties>
</aspect>

You can apply cm:indexControl aspect on the nodes to control the indexing behavior by setting the appropriate properties. Note that, this approach works only for certain types like cm:folder, cm:content and sub-types. You need to keep in mind that, if you have a large number of nodes which needs to be excluded from content/metadata indexing then this option is not a right choice as you will have to apply the aspect by setting "cm:isContentIndexed" to "false" on all those nodes. 
In this situation second option (which we will see next) comes handy.

To learn more on content model, aspects and their application, refer:  Content Model Extension Point

If you wish to bulk apply the aspect with updated values, this post may be useful as a reference: Applying the aspects in bulk

Saturday, June 4, 2022

Setup ACS-7.2.x with Elasticsearch and Transformation Service Step by Step

  

As part of the step by step series, I outlined the steps to install Alfresco Content Services 7.x and Solr6 (Alfresco Search Services 2.x) using distribution package in my previous posts.

You can take a look at the steps here
 

I am here with another part of step by step series on ACS installation. We will try to setup Alfresco Content Services-7.2.x Enterprise with Elasticsearch (Search Enterprise-3.x) and all other components. This post will set the background for those who are looking to upgrade from Solr6 (Alfresco search service 2.x) to Elasticsearch (Search Enterprise-3.x) and evaluating. 

Let me know in the comments as to why should you upgrade to Elasticsearch from Solr 6.

*** Updated this post to install ACS 7.2.1.3 that contains the patch for a memory leak issue. You can find more details here *** 


What we need before we start doing setup?

  1. ACS-7.2.x package (alfresco-content-services-distribution-7.2.1.3)
  2. ASE-3.x package (alfresco-elasticsearch-connector-distribution-3.1.1)
  3. Alfresco Transform 1.5.x package (alfresco-transform-service-distribution-1.5.3)
  4. Java: Oracle jdk-11.0.13 or later/Open JDK 11.0.13 or later (I will use Oracle jdk-11.0.15 for this post)
  5. Elasticsearch 7.10
  6. Tomcat: Tomcat 9.0.62
  7. ActiveMQ: ActiveMQ v5.16.2.
  8. DB: PostgreSQL 13
  9. ImageMagick: ImageMagick v7.1.0
  10. Libreoffice: LibreOffice v7.0.6

Checkout the documentation for additional details on ACS Supported Platforms and Search Enterprise Supported Platforms


Platform:

  • Windows 10 x64

Type of deployment:

  • ACS, Share, Elasticsearch (Search Enterprise-3.x), and Transformation Service on same machine

Let’s download all the required packages that we need for the setup.

  • Download Alfresco Content Services Enterprise 7.2.x package from Support Portal. If you have an enterprise license, you can also download the package from alfresco artifacts repository.
  • Download Alfresco Transform Service 1.5 package from Support Portal. If you have an enterprise license, you can also download the package from alfresco artifacts repository.
Checkout this GitHub repo for more info on transform core all-in-one project
  • Download Alfresco Search Enterprise 3.1.0 package from Support Portal. If you have an enterprise license, you can also download the package from alfresco artifacts repository.
  • Download Alfresco model namespace map generator add-on, it can be used for setting up elastic search indexing app.

https://www.oracle.com/java/technologies/javase/jdk11-archive-downloads.html

https://download.oracle.com/otn/java/jdk/11.0.15+8/c4e1848573124815b77d6f1843afccb5/jdk-11.0.15_windows-x64_bin.exe

Note: Make sure you set the JAVA_HOME environment variable (on windows). It is the installation path of jdk. E.g. JAVA_HOME=C:\Program Files\Java\jdk-11.0.15

https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.62/bin/apache-tomcat-9.0.62-windows-x64.zip

Note: Make sure ports 8005, 8080, 8443, AJP port 8009 are open and not in use already. These are default ports used for tomcat. If you have these ports already in use, make sure you change the ports accordingly in <TOMCAT_INSTALLATION>/conf/server.xml.

Download ActiveMQ v5.16.2 binary package (used for transformation service):





https://artifacts.alfresco.com/nexus/content/groups/public/org/exiftool/image-exiftool/12.25/image-exiftool-12.25.tgz

Download and Install PostgreSQL 13.x:

Alternatively you can also download the binary package and extract it. No installation needed. It is useful if you have trouble doing installation on Windows 10.

Download PostgreSQL 13.x binary

Note: Make sure port 5432 is open and not already in use. Port 5432 is default for postgres to get db connection. If you have this port already in use, make sure you select a different port and use the same while configuring alfresco-global.properties.

Optional Alfresco module packages (amps)-Useful for admins/developers:

Monday, May 16, 2022

Setup ACS-7.x, ASS-2.x and Local Transformation Service using distribution package step by step Part-2


As part of the step by step series, I outlined the steps to install Alfresco Content Services 7.0.0 and Alfresco Search Services 2.0.1 using distribution package on CentOS 7 x64 environment in my previous post.


You can take a look at the steps here

As many of you have requested ACS7 setup on Windows Platform as well, I am here with another part of step by step series on ACS installation.
Hyland Alfresco has released ACS7.2 recently, See the release notes hereI will be using the latest version for this post.

What we need before we start doing setup?

  1. ACS-7.2.0 package (alfresco-content-services-community-distribution-7.2.0.1)
  2. ASS-2.0.3 package (alfresco-search-services-2.0.3.5)
  3. Java: Oracle jdk-11.0.13 or later/Open JDK 11.0.13 or later (I will use Oracle jdk-11.0.15 for this post)
  4. Tomcat: Tomcat 9.0.62
  5. ActiveMQ: ActiveMQ v5.16.2. Mandatory for transformation services. Check this out for Local Transformation Service
  6. DB: PostgreSQL 13
  7. ImageMagick: ImageMagick v7.1.0
  8. Libreoffice: LibreOffice v7.0.6
  9. Alfresco Transform Core AIO Boot App v2.5.7
Checkout this documentation for additional details on Supported Platforms


Platform:

  • Windows 10 x64

Type of deployment:

  • ACS, Share, ASS (SOLR6), and Local transformation services on same machine
  • Setup With Shared Secret (Without SSL)

Let’s download all the required packages that we need for the setup.


Visit Alfresco community download page and download latest stable versions of ACS and ASS:

  • Download ACS-7.2.0 community:
https://artifacts.alfresco.com/nexus/service/local/repositories/releases/content/org/alfresco/alfresco-content-services-community-distribution/7.2.0.1/alfresco-content-services-community-distribution-7.2.0.1.zip


  • Download ASS-2.0.3:
https://artifacts.alfresco.com/nexus/service/local/repositories/releases/content/org/alfresco/alfresco-search-services/2.0.3.5/alfresco-search-services-2.0.3.5.zip

 

Note: If you are planning to setup ACS-7.2.0 (Enterprise version) and ASS-2.0.3, then download the appropriate distribution packages from Alfresco Support portal. All the steps outlined below will remain same. We are using community version of ACS 7.2  for this post hence we have to use ASS 2.0.3 as stated in the Supported platforms here


https://www.oracle.com/java/technologies/javase/jdk11-archive-downloads.html

https://download.oracle.com/otn/java/jdk/11.0.15+8/c4e1848573124815b77d6f1843afccb5/jdk-11.0.15_windows-x64_bin.exe

Note: Make sure you set the JAVA_HOME environment variable (on windows). It is the installation path of jdk. E.g. JAVA_HOME=C:\Program Files\Java\jdk-11.0.15


https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.62/bin/apache-tomcat-9.0.62-windows-x64.zip

Note: Make sure ports 8005, 8080, 8443, AJP port 8009 are open and not in use already. These are default ports used for tomcat. If you have these ports already in use, make sure you change the ports accordingly in <TOMCAT_INSTALLATION>/conf/server.xml.


Download ActiveMQ v5.16.2 binary package (used for transformation service):







Alternative options (ImageMagick notoriously removes the specific versions and shows only latest versions):


Download Exiftool v12.25:

https://artifacts.alfresco.com/nexus/content/groups/public/org/exiftool/image-exiftool/12.25/image-exiftool-12.25.tgz


Download and Install PostgreSQL 13.x:

Alternatively you can also download the binary package and extract it. No installation needed. It is useful if you have trouble doing installation on Windows 10.

Download PostgreSQL 13.x binary

Note: Make sure port 5432 is open and not already in use. Port 5432 is default for postgres to get db connection. If you have this port already in use, make sure you select a different port and use the same while configuring alfresco-global.properties.