Search - AtlasOfLivingAustralia/profile-hub Wiki

Profiles uses Elastic Search as the underlying search engine.

Every time a domain entity is added/updated/deleted in MongoDB, the ES index is updated automatically by the Grails ElasticSearch plugin.

Domain classes are mapped to the ES index via the static searchable = {} closure in each relevant domain class. Some notes/gotchas about this:

There are two levels of search in Profiles: Free-text and Name.

Free-text search

Searches for the provided text in the following fields:

All fields are analysed with the default ES analyser.

Result ranks are boosted for matches against the scientificName, matchedName or name-related attributes. Otherwise, the default ES relevance scoring is used.

Name search

Searches for the provided text in the following fields:

ScientificName and matchedName are matched using a term query where the only modification of the search term is to use a case-insensitive search. The ES analysers that are used in the free-text search will attempt to cater for spelling errors and punctuation differences: these are NOT carried out by the ES search. However, they are expected to be covered by the name matching steps - the ALA steps definitely cover this requirements, but I'm not sure if the NSL matching does.

NOTE: As of 20/6/16, the two NSL steps in the diagram above are NOT fully implemented - a new version of the NSL search service is under development, and will be used as soon as it is available, and there will be additional future work required to support multiple taxonomic trees from the NSL.