GeoNetwork opensource
  • Vue d’ensemble
    • À propos
    • Licence
    • Auteur
      • Project Steering Committee (PSC)
      • Committers
      • Contributors
      • The documentation
    • Change log
      • Version 3.0.0
      • Version 3.0.1
      • Version 3.0.2
      • Version 3.0.3
      • Version 3.0.4
      • Version 3.2.0
      • Version 3.2.1
      • Version 3.2.2
      • Version 3.4.0
      • Version 3.4.1
      • Version 3.4.2
      • Version 3.4.3
      • Version 3.4.4
      • Version 3.6.0
      • Version 3.8.0
      • Version 3.8.1
      • Version 3.8.2
      • Version 3.8.3
      • Version 3.10.0
      • Version 3.10.1
      • Version 3.10.2
      • Version 3.10.3
      • Version 3.10.4
      • Version 3.10.5
      • Version 4.0.0-alpha.1
      • Version 4.0.0-alpha.2
      • Version 4.0.0
      • Version 4.0.1
      • Version 4.0.2
  • Installation guide
    • Installing using a ZIP file
    • Installing from WAR file
    • Installing with docker
    • Building from Source Code
      • System Requirements
      • Tools
      • Building & Running
    • Installing search platform
      • Manual installation
      • Customizing index
      • Install using Maven
      • Check installation
      • Configure connection
    • Configuring the database
    • Customizing the data directory
      • Creating a new data directory
      • Setting the data directory
      • Java System Property
      • Bean configuration
      • Using a S3 object storage
      • Structure of the data directory
      • Advanced data directory configuration
      • Check the configuration
    • Configuring printing of the map
    • Loading templates and sample data
      • Signing in and loading templates
  • User guide
    • Quick start
      • Starting the catalog
      • Signing in and load templates
      • Searching information
      • Discovering information
    • Maps and dataset visualisation
      • Map viewer
      • Store and share maps
    • Describing information
      • Creating templates
      • Creating a new record
      • Importing a new record
      • Editing metadata
      • Deleting a record
      • Multilingual editing
      • Describing resources for the INSPIRE directive
      • Migrating from Technical guidance version 1.3 to version 2.0
    • Associating resources
      • Association des documents
      • Associating another record
      • Digital Object Identifier (DOI)
    • Classify information
      • Tagging with categories
      • Tagging with keywords
    • Publishing
      • Managing privileges
      • Setting Privileges
      • Restricting information to metadata sections
      • Transferring privileges
    • Analyzing data
      • Statistics on catalog content
      • Analyze and visualize data
    • Cycle de vie
      • Validating records
      • Suggestion for improving metadata content
      • Life cycle
      • Publishing GIS data in a map server
      • Versionnement
      • Updating a set of records
    • Moissonnage
      • GeoNetwork 2.0 Harvester
      • Harvesting CSW services
      • Harvesting OGC Services
      • Local File System Harvesting
      • WEBDAV Harvesting
      • OAIPMH Harvesting
      • Harvesting an ARCSDE Node
      • GeoPortal REST Harvesting
      • THREDDS Harvesting
      • WFS GetFeature Harvesting
      • Z3950 Harvesting
      • Mechanism overview
      • Harvesting life cycle
      • Multiple harvesting and hierarchies
      • Harvesting Fragments of Metadata to support re-use
      • HTTPS support
      • The main page
      • Harvesting Status and Error Icons
      • Harvesting result tips
      • Adding new harvesters
      • Harvest History
    • Exporting records
      • Export as a ZIP archive
      • Export as a CSV file
  • Guide de l’administrateur
    • Configuration du catalogue
      • Configuration du système
      • User Interface Configuration
      • Configuring CSS & Style
      • Configuration du CSW
      • Portal configuration
      • Configuring for the INSPIRE Directive
      • Map servers configuration for geopublication
    • Managing users and groups
      • Creating group
      • Creating user
      • User Self-Registration
      • Mode d’authentification
      • Default user
      • User session
      • Users, Groups and Roles
    • Gérer le système de classification
      • Managing categories
      • Managing directories
      • Managing thesaurus
    • Managing metadata & template
      • Managing metadata standards
      • Configuring validation levels
      • Configuring metadata identifier
  • Maintainer guide
    • Setting up search/content statistics
      • Setup ElasticSearch
      • Setup Kibana
      • Setup GeoNetwork
    • Updating the application
      • Automatic update
      • Manual update
    • Backup the application
    • Production use
      • Database
      • Java container
      • Data folder
      • Memory
      • Scaling
      • GeoNetwork and Docker
      • Web Proxy
      • WEB
  • API guide
    • GeoNetwork API
      • Using the API to apply an XSL process
      • Building client for the API using codegen
    • Main search service
    • CSW
      • Configuration
      • URL
      • Requests
    • OpenSearch and INSPIRE ATOM
      • OpenSearch
      • INSPIRE ATOM
    • RDF DCAT end point
      • URLS
      • Query parameters
    • Open Archive Initiative (OAI)
    • Z39-50
  • Contributing guide
    • Writing documentation
      • Building the docs
      • Building the standards docs
      • Editing the reStructuredText files
      • Sphinx
      • Translating the doc
    • Style Guide
      • Preferred Terminology
    • Traduire l’application
    • Traduire un standard
    • Making a pull request
    • Doing a GeoNetwork release
  • Customizing guide
    • Application de recherche
      • Create your own view
      • Change default view configuration
      • Create your own view
      • Enrich your custom view
      • Wro4j resource management
    • Customizing metadata views
    • Customizing editor
      • Defining field type
      • Grouping element from the standards
      • Defining multilingual fields
      • Configuring views
      • Defining a view
      • Defining a tab
      • Adding a section to a tab
      • Adding a field
      • Adding a template based field
      • Adding documentation or help
      • Adding a button
      • Adding a group
    • Theming
    • Configuring search fields
      • Index field types
      • Add a search field
      • Boosting at search time
      • Scoring
      • Language analyzer
    • Configuring faceted search
    • Configuration avancées
      • User session timeout configuration
    • Adding static pages
      • Examples of API usage
    • Implementing schema plugins
      • Metadata schemas and profiles
      • Implementing a metadata schema or profile
      • Schema Plugins
    • Characterset
    • Miscellaneous
      • Invalid CSRF Token
      • Using the H2 database
  • Tutorials
    • Introduction to GeoNetwork
      • Deployment
      • Setup
      • Editing Metadata
      • Moissonnage
    • Customize your GeoNetwork UI
      • Search page
      • Mise en page
    • Hook your own code
      • Separate your code
      • Using Events
      • Adding new User Interface
      • Schema Plugins
      • Search Fields
    • Tutorials
      • Tutorial setting up INSPIRE view service with GeoNetwork and GeoServer
      • Tutorial setting up INSPIRE view service with GeoNetwork and Mapserver
      • Tutorial setting up an Atom/OpenSearch based INSPIRE download service
      • Tutorial setting up a WFS based INSPIRE download service with GeoServer
  • Annexes
    • Metadata Exchange Format (MEF)
    • Some GeoNetwork nodes
    • Glossary
    • Standards
      • Geographic information – Metadata (iso19115-3.2018)
      • Geographic information – Metadata (iso19139:2007) (iso19139)
      • Geographic information – Methodology for feature cataloguing (iso19110)
      • Dublin core (dublin-core)
 
GeoNetwork opensource
  • Docs »
  • Customizing guide »
  • Configuring faceted search
  • Edit on GitHub

Configuring faceted search¶

Facets also known as aggregation in Elasticsearch are used to provide simple search entries. GeoNetwork is using facet in different places:

  • Home page categories

../_images/agg-home.png
  • Search results

../_images/agg-search.png

All facet configurations are stored in the user interface configuration (see User Interface Configuration). The configuration are defined using JSON following Elasticsearch API (See https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket.html).

By default, the facet configurations are defined as (see source file web-ui/src/main/resources/catalog/js/CatController.js). The home page display on the left side inspireThemeUri and topic_text and on the right side, the last facet defined codelist_hierarchyLevel_text.

Simple aggregation on a field:

"cl_hierarchyLevel.key": {
  "terms": {
    "field": "cl_hierarchyLevel.key"
  }
}

For codelist, use .default for not multilingual catalogue with one language only UI.

"cl_spatialRepresentationType.default": {
   "terms": {
     "field": "cl_spatialRepresentationType.default",
     "size": 10
   }
 },

Use .key for codelist for multilingual catalogue. The codelist translation needs to be loaded in the client app. See GnSearchModule.js.

"cl_spatialRepresentationType.key": {
     "terms": {
       "field": "cl_spatialRepresentationType.key",
       "size": 10
     }
   },

GEMET configuration for non multilingual catalog default property contains the default language so if all records have in the same language there is no mix of languages. In the user interface, this language is displayed.

"th_gemet_tree.default": {
  "terms": {
    "field": "th_gemet_tree.default",
    "size": 100,
    "order" : { "_key" : "asc" },
    "include": "[^\^]+^?[^\^]+"
    // Limit to 2 levels
  }
},

If records are not all in all the same languages, languages can be mixed together.

GEMET configuration for multilingual catalog. The key is translated on client side by loading required concepts using the thesaurus API.

"th_gemet_tree.key": {
  "terms": {
    "field": "th_gemet_tree.key",
    "size": 100,
    "order" : { "_key" : "asc" },
    "include": "[^\^]+^?[^\^]+"
    // Limit to 2 levels
  }
}

With the key, french and english translations are considered equivalent.

Aggregation based on queries. One query will define one bucket in the aggregation.

"availableInServices": {
  "filters": {
    //"other_bucket_key": "others",
    // But does not support to click on it
    "filters": {
      "availableInViewService": {
        "query_string": {
          "query": "+linkProtocol:/OGC:WMS.*/"
        }
      },
      "availableInDownloadService": {
        "query_string": {
          "query": "+linkProtocol:/OGC:WFS.*/"
        }
      }
    }
  }
}

Key like availableInViewService may not be available in the translations. Use the translation API to add your custom translation in the database.

To enable filtering in a facet, add an include property:

"tag.default": {
  "terms": {
    "field": "tag.default",
    "include": ".*",
    "size": 10
  }
}

include and exclude properties can be used to filter values too.

Aggregations can be collapsed by default and visible to users depending on roles:

"dateStamp" : {
   "userHasRole": "isReviewerOrMore",
   "collapsed": true,
   "auto_date_histogram" : {
     "field" : "dateStamp",
     "buckets": 50
   }

(Experimental) A tree field which contains a URI eg. http://www.ifremer.fr/thesaurus/sextant/theme#52 but with a translation which contains a hierarchy with a custom separator /Regulation and Management/Technical and Management Zonations/Sensitive Zones

"th_sextant-theme_tree.key": {
  "terms": {
    "field": "th_sextant-theme_tree.key",
    "size": 100,
    "order" : { "_key" : "asc" }
  },
  "meta": {
    "translateOnLoad": true,
    "treeKeySeparator": "/"
  }
}

The search results facets configuration is defined in the search section and contains various examples of what you can do using facets:

  • Nested facets

  • Facet based on filter

  • Use order to sort facets

  • Use include to limit values

  • Use collapsed to collapse the item on load

  • Use “userHasRole”: “isReviewerOrMore”, to display facet depending on user roles

  • Use field ending with _tree to hierarchy mode

'facetConfig': {
   'codelist_hierarchyLevel_text': {
     'terms': {
       'field': 'codelist_hierarchyLevel_text'
     },
     'aggs': {
       'format': {
         'terms': {
           'field': 'format'
         }
       }
     }
   },
   'codelist_spatialRepresentationType': {
     'terms': {
       'field': 'codelist_spatialRepresentationType',
       'size': 10
     }
   },
   'availableInServices': {
     'filters': {
       //"other_bucket_key": "others",
       // But does not support to click on it
       'filters': {
         'availableInViewService': {
           'query_string': {
             'query': '+linkProtocol:/OGC:WMS.*/'
           }
         },
         'availableInDownloadService': {
           'query_string': {
             'query': '+linkProtocol:/OGC:WFS.*/'
           }
         }
       }
     }
   },
   'th_gemet_tree': {
     'terms': {
       'field': 'th_gemet_tree',
       'size': 100,
       "order" : { "_key" : "asc" },
       "include": "[^\^]+^?[^\^]+"
       // Limit to 2 levels
     }
   },

Currently supported aggregations are:

  • terms

  • filters

  • histogram

"resolutionScaleDenominator": {
  "histogram": {
    "field": "resolutionScaleDenominator",
    "interval": 10000,
    "keyed" : true,
    "min_doc_count": 1
  }
},
"creationYearForResource": {
  "histogram": {
    "field": "creationYearForResource",
    "interval": 5,
    "keyed" : true,
    "min_doc_count": 1
  }
},
Next Previous

© Copyright 2001-2021, GeoNetwork opensource. Licensed under Creative Commons Attribution ShareAlike (Unported) v3.0 License.

Built with Sphinx using a theme provided by Read the Docs.