Skip to content

Search engine configuration

Marten edited this page May 11, 2026 · 2 revisions

Configure unsecured (http) search engine instance

In production, plan to use a secure connection to your search engine. for development (localhost), connecting over http may be ok. To use an unsecured instance over http, follow the documentation of your search engine and then in Geoportal Server configuration do the following:

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

Configure Geoportal to use a secured search engine

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="" /> 

The account information can be stored in environment variables using the ${key} approach. The password should be encrypted (see below).

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 8.x for aggregate on built-in-field _id.

This is mandatory configuration for Geoportal only for Elastic 8.x

Open elasticSearch.yml

indices.id_field_data.enabled: true

AWS Opensearch: Optional. If Geoportal gives any error related to field_data then apply below setting, otherwise, do not apply

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>

Configure Geoportal to use Amazon Opensearch Serverless

Amazon-Opensearch-Serverless

Use encrypted password for the search engine

The search engine may be secured using its own credentials. Follow the engine's documentation for configuration of this access control. To avoid storing a clear-text secret in the configuration file, you can encrypt this password using a utility provided here. Download the utility from https://github.com/Esri/geoportal-server-catalog/tree/master/geoportal/doc/encrypt_password. Used this to generate an encrypted password using AES 256 symmetric encryption algorithm and include that in the configuration.

  1. Unzip EncryptPassword.zip in C or D drive.

  2. Open command prompt

  3. Make sure that java path is set java --version

  4. cd c:\EncryptPassword

  5. EncryptPassword.bat <password_to_encrypt>

  6. Note down Base64 Key, Base64 IV and Encrypted password

  7. Open app-context.xml and use the values noted above

     <beans:property name="password" value="" />
     <beans:property name="encryptPassword" value="true" />
     <!-- If encryptPassword =true, Uncomment below and configure the keys -->
     <!-- 
     <beans:property name="base64Key" value="${gpt_base64Key}" />
     <beans:property name="base64Iv" value="${gpt_base64Iv}" />
    

Clone this wiki locally