Elasticsearch
Add support for searching Catalog data using Elasticsearch.
Indexing
- Entities should be automatically added and removed from ES (on JPA Save/Remove)
- ES index must be configured to index entity data and all relevant related data.
Search
- Develop individual API endpoints for datasets, descriptors, descriptor lists
- API search endpoint will search ES and return matching entities
Search results
Search results returned by the API are grouped by "entity": descriptor terms, crops, institutes, etc. and ordered by relevance to the search.
The selected hits are then applied as filter values to the filtering API. For that to work we need to know how various entities relate to what we are searching.
Example: Partners
Partners database accepts the following filters:
{
"shortName": [ "string1", "string2" ],
"name": { StringFilter },
"description": { StringFilter },
"wiewsCodes": [ "WIEWS1", "WIEWS2", "WIEWS3" ]
}
When the Search API returns matching records from the "FAO WIEWS Institute codes" vocabulary, these hits can only be applied to the wiewsCode
Partner filter.
Example: Dataset
Dataset filtering accepts:
{
"owner": { PartnerFilter },
"accessionIdentifier": { AccessionIdentifierFilter },
"descriptor": { DescriptorFilter },
"crop": [ "crop1", "crop2" ],
...
}
Hits from Crop
entity can be applied to crop
filter, hits from Descriptor
entity can be applied to descriptor.id
filter.