Skip to content

Elastic Search configuration

Ankita Srivastava edited this page Oct 16, 2024 · 1 revision

Configure Elastic Search 8.x

This page describes how to configure Elastic Search for Geoportal.

Configure Geoportal to use secured elastic search

Open app-context.xml and enter username and password

  <beans:property name="useHttps" value="true" /> 
  <beans:property name="username" value="" />
  <beans:property name="password" value="" /> 

Change localhost to fully qualified domain name if required

   <beans:property name="nodes">
	<!-- The list of host names within the Elasticsearch cluster, one value element per host -->
	<beans:list>
	  <beans:value>${es_node:localhost}</beans:value> 
	</beans:list>
  </beans:property>

Configure Elasticsearch for aggregate on built-in-field _id

This is mandatory configuration for Geoportal

Open elasticSearch.yml

indices.id_field_data.enabled: true

For update in AWS Opensearch

curl --location --request PUT 'https://opensearch_fqdn/_cluster/settings' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic ...' \
--data '{
    "persistent" : {
        "indices.id_field_data.enabled" : true
    }
}'

Configure Geoportal to use AWS opensearch

Open app-context.xml and configure port, credentials and opensearch_fqdn

   <beans:property name="httpPort" value="443" />
	
  <beans:property name="useHttps" value="true" /> 
  <beans:property name="username" value="" />
  <beans:property name="password" value="" />

   <beans:property name="nodes">
	<!-- The list of host names within the Elasticsearch cluster, one value element per host -->
	<beans:list>
	  <beans:value>${es_node:opensearch_fqdn}</beans:value> 
	</beans:list>
  </beans:property>

Support non secure (http) Elastic instance

Elastic 8.x supports https by default. To use non secure (http), follow below configuration

  1. Disable SSL : https://github.com/Esri/geoportal-server-catalog/wiki/Elasticsearch-configuration#disable-ssl-in--elasticsearch
  2. Open app-context.xml
   <beans:property name="useHttps" value="false" /> 
Clone this wiki locally