Skip to content

Elasticsearch

Index

GeoNetwork-UI provides multiple pathways to retrieve records based on specific criteria: Main Search, Suggestion Search (autocomplete), and Similar Record Search.

Note: This documentation excludes search by organization, which functions as an exact match search.

All search requests are routed to GeoNetwork/ElasticSearch.

Query Type: query_string

This is the primary search function. It queries the following fields with specific importance weightings (boosts):

Target FieldBoost Value
Title5
Keywords4
Abstract3
Lineage2
All Fields1
UUID1

Source Definition:

  • geonetwork-ui/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.ts
    • buildPayloadQuery
  • geonetwork-ui/libs/api/repository/src/lib/gn4/elasticsearch/constant.ts
    • ES_QUERY_FIELDS_PRIORITY

2. Suggestion Search (Autocomplete)

Query Type: multi_match (type: bool_prefix)

Used for autocomplete functionality. It prioritizes the title significantly but excludes general fields and lineage.

Target FieldBoost Value
Title4
Abstract3
Keywords2
Resource Identifier1

Source Definition:

  • geonetwork-ui/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.ts
    • buildAutocompletePayload

Query Type: more_like_this

This search generates a list of related records. It operates by creating a "virtual document" containing only the specific fields listed below and comparing this virtual document against all documents indexed by ElasticSearch.

Fields considered:

  • Title
  • Abstract
  • Keywords

Source Definition:

  • geonetwork-ui/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.ts
    • getRelatedRecordPayload

Released under the GPL-2.0 license.