Liferay
Liferay is a prominent Content Management System that is adopted by enterprises across the world to build portals and corporate sites.
Search is a very important and widely used feature of Liferay development. Elasticsearch goes well with Liferay. Liferay architectures either use embedded Elasticsearch or use the Remote Elasticsearch. The experts of the Liferay development services recommend using the Remote Elasticsearch option as it enhances the search performance of the system. Embedded is not recommended for production environments as it might slow down the performance.
In this blog, we have provided the steps to be performed to integrate remote Elasticsearch with Liferay DXP 7.2.
1) Check the Liferay compatibility matrix for the Elastic search version.
https://www.liferay.com/documents/10182/246659966/Liferay+DXP+7.2+Compatibility+Matrix.pdf/ed234765-db47-c4ad-7c82-2acb4c73b0f9
2) For instance we are using ElasticSearch Version 7.6.2 which can be downloaded from the link below.
https://www.elastic.co/downloads/past-releases/elasticsearch-7-6-2
3) Elasticsearch services basically require the permission of a user named elasticsearch user only you can create elasticsearch user with the below command.
sudo useradd -m elasticsearch
4) Upgrade Liferay elastic search from 6. x to 7. x by downloading Liferay Connector ElasticSearch 7 lpkg plugin from the Liferay marketplace.
5) To install pkg, copy the pkg file to Liferay’s deploy folder and let the file get started.
6) Once the pkg is started shut down the server.
7) Blacklist the 6.x elastic search by creating com.liferay.portal.bundle.blacklist.internal.BundleBlacklistConfiguration.config file in server osgi config.
8) In com.liferay.portal.bundle.blacklist.internal.BundleBlacklistConfiguration.config file put the following content.
blacklistBundleSymbolicNames=[ \
“com.liferay.portal.search.elasticsearch6.api”, \
“com.liferay.portal.search.elasticsearch6.impl”, \
“com.liferay.portal.search.elasticsearch6.spi”, \
“com.liferay.portal.search.elasticsearch6.xpack.security.impl”, \
“Liferay Connector to X-Pack Security [Elastic Stack 6.x] – Impl” \
]
9) Now clear servers temp, work, osgi/state folders and restart the server (A best practise step,not documented anywhere).
10) Start the server and reindex all searches.
11) create a directory named elasticsearch in /var/lib/ & /var/log/ folder and assign elasticsearch user permission to those directories.
12) Go to /home/elasticsearch/elasticsearch7.6.2/config/elasticsearch.yml file and enter following details.
node.name-anyname,host-127.0.0.1,port-9200
13) Go to /home/elasticsearch/elasticsearch7.6.2/bin and install following plugins using command sudo ./elasticsearch-plugin install <>.
analysis-icu,analysis-kuromoji,analysis-smartcn,analysis-stempel
14) Kill all java processes, if running.
15) Start elasticsearch by going to /home/elasticsearch/elasticsearch7.6.2/bin and using command ./elasticsearch -d
16) Go to Liferay server osgi/config folder create a file named com.liferay.portal.search.elasticsearch7.configuration.ElasticsearchConfiguration.config
Enter the following details in this file.
additionalConfigurations=””
additionalIndexConfigurations=””
additionalTypeMappings=””
bootstrapMlockAll=”false”
clientTransportIgnoreClusterName=”false”
clientTransportNodesSamplerInterval=””
clientTransportPingTimeout=””
clientTransportSniff=”true”
clusterName=”LiferayElasticsearchCluster”
discoveryZenPingUnicastHostsPort=”9300-9400″
httpCORSAllowOrigin=”/https?://localhost(:[0-9]+)?/”
httpCORSConfigurations=””
httpCORSEnabled=”true”
httpEnabled=”true”
indexNamePrefix=”liferay-”
indexNumberOfReplicas=””
indexNumberOfShards=””
logExceptionsOnly=”true”
networkBindHost=””
networkHost=””
networkPublishHost=””
operationMode=”REMOTE”
overrideTypeMappings=””
retryOnConflict=”5″
transportAddresses = [ \
“localhost:9300″, \
]
transportTcpPort=””
17) Restart the server and go to search and do reindex all, reindex spell.
That will ensure that the Liferay DXP is running with remote Elasticsearch.
Tridhya Tech is a prominent Liferay development company. We provide customized, robust, and cost-effective content management solutions using the Liferay DXP version to our enterprise clients. Apart from Liferay DXP portal development services and upgrades, we also offer consultancy, support, and maintenance services.
If you want to get a customized portal solution to streamline the content management at your business,
Contact UsLiferay
Compare Liferay DXP and Adobe AEM in this comprehensive guide, exploring features, benefits, pricing, and ideal use cases to aid…
17 Oct 2024
Liferay
In today’s digital landscape, soaring IT budgets can hinder growth. Explore how Liferay’s innovative solutions boost ROI while optimizing costs,…
16 Sep 2024
Liferay
Customers are no longer satisfied with the bare minimum. They expect 24/7 customer service, seamless checkouts, speed, convenience, and more…
22 Aug 2024
Liferay
with the surge of Banking as a Service, BaaS, and Fintech innovating banking solutions, the digital transformation in banking sets…
02 Aug 2024
401, One World West, Nr. Ambli T-Junction 200, S P Ring Road, Bopal, Ahmedabad, Gujarat 380058
Kemp House 160 City Road, London, United Kingdom EC1V 2NX
Nürnberger Str. 46 90579 Langenzenn Deutschland
Level 36 Riparian Plaza, 71 Eagle Street, Brisbane, QLD 4000
4411 Suwanee Dam road, Bld. 300 Ste. 350 Suwanee GA, 30024
Cube Work Space, 24 Hans Strijdom Avenue, Cape Town
B 503 Sama Tower, Sheikh Zayed Road, United Arab Emirates
34 Applegrove Ct. Brampton ON L6R 2Y8
We use cookies to improve your browsing experience.
OKAYThis website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.
Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.
If you disable this cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.