Configuring Search

Liferay uses Elasticsearch to search and index content. In a Liferay cluster, Elasticsearch must be installed on a separate server accessible by each node. Follow the steps below to configure Elasticsearch. See Getting Started with Elasticsearch to learn more.

Running Elasticsearch

  1. Create a local folder for storing Elasticsearch’s data volume. For example,

    mkdir -p [your_folder]/elasticsearch/es_data_volume
    
  2. Start a new Elasticsearch container.

    docker run -it \
       -e cluster.name=LiferayElasticsearchCluster \
       -e ES_JAVA_OPTS="-Xms512m -Xmx512m" \
       --name elasticsearch \
       -p 9200:9200 \
       -p 9300:9300 \
       -v $(pwd)/elasticsearch/es_data_volume:/usr/share/elasticsearch/data \
       elasticsearch:8.6.2
    
  3. Install Elasticsearch plugins.

    docker exec -it elasticsearch bash -c '/usr/share/elasticsearch/bin/elasticsearch-plugin install analysis-icu && /usr/share/elasticsearch/bin/elasticsearch-plugin install analysis-kuromoji && /usr/share/elasticsearch/bin/elasticsearch-plugin install analysis-smartcn && /usr/share/elasticsearch/bin/elasticsearch-plugin install analysis-stempel'
    

The next step is configuring the DXP cluster.

Relevant Concepts

Capabilities

Product

Contact Us

Connect

Powered by Liferay
© 2024 Liferay Inc. All Rights Reserved • Privacy Policy