GeoNetwork opensource
  • Overview
    • About
    • License
    • Author
      • 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 3.10.6
      • Version 3.10.7
      • Version 3.10.8
      • Version 3.10.9
      • Version 3.10.10
      • Version 3.12.0
      • Version 3.12.1
      • Version 3.12.2
      • Version 3.12.3
      • Version 3.12.4
      • Version 3.12.5
      • Version 3.12.6
      • Version 3.12.7
      • Version 3.12.8
      • Version 3.12.9
  • Installation guide
    • Installing using a ZIP file
    • Installing using a WAR file
    • Building from Source Code
      • System Requirements
      • Tools
      • Building & Running
    • Installing a third-party distribution
    • Installing remote index
      • Manual installation
      • Install using Maven
      • Check installation
      • Configure connection
    • Configuring the database
      • Introduction
      • H2 database
      • Configuring a database via config files
      • Configuring a database via JNDI
      • Configuring a database via environment
      • Logging
      • Summary
    • 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
    • Logging
      • Customising the log file location
      • Setting the Loglevel
      • Log4j
    • Using multinode mode
      • Overview
      • 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
      • Storing and sharing maps
    • Describing information
      • Managing 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
      • Associating 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
    • Workflow
      • Validating records
      • Suggestion for improving metadata content
      • Life cycle
      • Publishing GIS data in a map server
      • Versioning
      • Updating a set of records
    • Harvesting
      • 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
  • Administrator guide
    • Configuring the catalog
      • System configuration
      • User Interface Configuration
      • Configuring CSS & Style
      • Configuring CSW
      • Portal configuration
      • Configuring virtual CSW
      • Configuring for the INSPIRE Directive
      • Map servers configuration for geopublication
    • Managing users and groups
      • Creating group
      • Creating user
      • User Self-Registration
      • Authentication mode
      • Default user
      • User session
      • Users, Groups and Roles
    • Managing classification system
      • 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
    • 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
      • Connecting to the API with python
    • Catalog Service for the Web (CSW)
      • Configuration
      • URL
      • Requests
    • OpenSearch and INSPIRE ATOM
      • OpenSearch
      • INSPIRE ATOM
    • Q Search
      • Query results parameters
      • Query filter parameters
      • Date Searches
      • Query examples
    • RDF DCAT end point
      • URLS
      • Query parameters
    • Open Archive Initiative (OAI)
      • Configuration
      • Requests
    • 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
    • Translating the application
    • Translating a standard
    • Making a pull request
    • Doing a GeoNetwork release
  • Customizing guide
    • Search application
      • 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
      • Add a search field
      • Boosting documents and fields
      • Boosting search results
    • Configuring faceted search
      • Facet principle
      • Facet response when searching
      • Configuration
    • Advanced configuration
      • 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
      • Harvesting
    • Customize your GeoNetwork UI
      • Search page
      • Formatter
    • 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¶

Facet principle¶

Faceted search provides a way to easily filter search.

../_images/facet.png

2 types of facets exist:

  • simple facet (only a list of value)

  • hierarchical facet (a category tree of value) requiring a thesaurus with relations.

Facet response when searching¶

When running a search a resultType parameter define a set of facet to return.

A facet response looks like the following:

<response from="1" to="20" selected="0">
  <summary count="134" type="local">
    <dimension name="type" label="types">
      <category value="dataset" label="Dataset" count="86"/>
      <category value="series" label="Series" count="41"/>
      <category value="service" label="Service" count="7"/>
    </dimension>
    <dimension name="denominator" label="denominators">
      <category value="200000" label="200000" count="1"/>
      <category value="50000" label="50000" count="1"/>
      <category value="25000" label="25000" count="1"/>
      <category value="15000" label="15000" count="4"/>
      <category value="10000" label="10000" count="1"/>
      <category value="5000" label="5000" count="3"/>
      <category value="2000" label="2000" count="12"/>
    </dimension>
    <dimension name="resolution" label="resolutions">
      <category value="5 m" label="5 m" count="10"/>
      <category value="1 m" label="1 m" count="3"/>
      <category value="0.20 m" label="0.20 m" count="1"/>
    </dimension>
  </summary>

User can retrieve a JSON response by adding _content_type=json in the parameter list.

Configuration¶

The facet configuration is done manually in WEB-INF/config-summary.xml. After change, stop the application, drop the index and start the application to fully rebuild the index.

A facet is based on a field in the index (see Configuring search fields).

Each facet to be indexed is defined in the facets element. The facets element lists the facets to index and how they should be indexed using attributes on facet elements as follows:

  • name: the name of the facet

  • indexKey: the name of the indexing field to be used for the facet

  • label: the label to use for the facet in returned summaries

  • (optional) classifier: a reference to a spring bean that should be used to determine facet values for the indexing field. Used for hierarchical facets. The bean must implement the org.fao.kernel.search.classifier.Classifier interface Defaults to a classifier which uses the value of the field to be indexed

  • localized: todo documentation

eg. for a simple facet

<facet name="denominator"
       indexKey="denominator"
       label="denominators"/>

eg. for a hierarchical facet based on a thesaurus.

  1. Define the facet

<facet name="gemetKeyword"
       label="gemetKeywords"
       indexKey="keyword"
       classifier="gemetKeywordClassifier"/>
  1. Register the classifier in WEB-INF/config-spring-geonetwork.xml

<bean id="gemetKeywordClassifier"
      class="org.fao.geonet.kernel.search.classifier.TermLabel" lazy-init="true">
  <constructor-arg name="finder" ref="ThesaurusManager"/>
  <constructor-arg name="conceptScheme" value="http://geonetwork-opensource.org/gemet"/>
  <constructor-arg name="langCode" value="eng"/>
</bean>
  1. Add the facet to a summary type (see below)

How facet summaries should be built and formatted for each summary type is defined in the summaryTypes element. Create a new facet sets using:

<summaryTypes>
  <summaryType name="details" format="DIMENSION">

The format attribute set to DIMENSION is the preferred format with a top level dimension tag and category tags for sub-categories which is more suitable for hierarchical facets. It also support one level facets.

Obsolète depuis la version the: format FACET_NAME (still the default) was used for generating facet summary elements using one level only. This mode is not recommended.

The summaryTypes element contains a number of summaryType elements each of which define a facet summary that can be configured for a service. Each summaryType element contains a list of facets (item) to be returned and how they should be formatted as follows:

  • facet: the name of a facet defined above

  • (optional) sortBy: the ordering for the facet. Defaults to by count.

  • (optional) sortOrder: asc or desc. Defaults is descendant.

  • (optional) max: the number of values to be returned for the facet. Defaults to 10.

  • (optional) depth: the depth to which hierarchical facets should be summarised. Defaults to 1.

  • (optional) translator: Define a DB translator to retrieve label from description tables (e.g. categories) or codelist translator to retrieve label from schema codelists files.

eg. for category

<item dimension="category"
      plural="categories"
      indexKey="_cat"
      max="45"
      translator="db:org.fao.geonet.repository.MetadataCategoryRepository:findOneByName"/>

or for group

<item dimension="groupOwner"
      plural="groupOwners"
      indexKey="_groupOwner"
      max="99"
      sortBy="value"
      translator="db:org.fao.geonet.repository.GroupRepository:findOne:int"/>
Next Previous

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

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