Installing search platform
The GeoNetwork search engine is built on top of Elasticsearch. The platform is used to index records and also to index WFS data (See Analyze and visualize data ).
GeoNetwork requires an Elasticsearch instance to be installed next to the catalog.
Elasticsearch compatibility
Elasticsearch Java client version: 8.14.3
Elasticsearch Version | Compatibility |
---|---|
Elasticsearch 8.14.3 | recommended |
Elasticsearch 8.14.x | minimum |
Older version may be supported but are untested.
Installation
-
Download: Elasticsearch
8.14.3
from https://www.elastic.co/downloads/elasticsearch and unzip the file. -
Start: Manually start Elasticsearch using:
-
Stop: Manually stop Elasticsearch using:
-
Developers are encouraged to run Elasticseach using maven in order to test against the version of Elasticsearch intended for the next release.
Note
When running from source code the Elasticsearch version is obtained from pom.xml property
es.version
. -
Download: Run maven from the
es
directory. -
Start: Use maven
exec
plugin to run Elasticsearch:Elasticsearch will run in foreground mode sending output to the shell.
-
Stop: To stop Elasticsearch use Ctrl+C to stop the maven process.
Index creation
-
GeoNetwork will connect to Elasticsearch on startup, and indices will be created if they do not exist.
-
GeoNetwork will start even if Elasticsearch index is down (or not yet running).
-
When GeoNetwork cannot contact Elasticsearch a warning will be displayed.
-
When Elasticsearch index is available, indices are created if they do not exist.
-
-
Optional: To manually create indices use the Admin Console to create the default index.
The application will create indices automatically once the Elasticsearch is up and running and if no indices are found.
Customizing index
-
User may want to customize the index settings for example to change language configuration (see es/README.md).
-
Check the configuration file in
$GN_DATA_DIRECTORY/config/index
. -
To manually remove and recreate the index, use the following:
cd $GN_DATA_DIRECTORY/config/index curl -X DELETE http://localhost:9200/features curl -X DELETE http://localhost:9200/records curl -X DELETE http://localhost:9200/searchlogs curl -X PUT http://localhost:9200/features -H 'Content-Type: application/json' -d @features.json curl -X PUT http://localhost:9200/records -H 'Content-Type: application/json' -d @records.json curl -X PUT http://localhost:9200/searchlogs -H 'Content-Type: application/json' -d @searchlogs.json
Check Elasticsearch installation
-
Access Elasticsearch admin page from http://localhost:9200/.
Note
It is not needed nor recommended to open port
9200
to the outside. GeoNetwork is protecting the Elasticsearch instance exposing only the search API and taking care of user privileges.
Configure GeoNetwork connection to Elasticsearch
-
Update Elasticsearch connection details in
WEB-INF/config.properties
: -
Restart the application: