biodiversitydata-se / SBDI4R

R package to search and access data made available through the Swedish biodiversity data infrastructure SBDI
https://biodiversitydata-se.github.io/SBDI4R/
GNU Affero General Public License v3.0
1 stars 2 forks source link

selecting species observations: facet search & filtering #18

Open DeboraArlt opened 3 years ago

DeboraArlt commented 3 years ago

We want to be able to search for species observations using flexible a priori (before download) filter on field values.

Similar to other filters: ALA4R occurrence() function allows filtering by exact match field value but not more flexible rules, and not by facets. In occurrence() function one can specify a 'fq' optional string for specifying filters to be applied to the original query, of the form "indexedfield:value" (I assume this works only for exact matches but no "larger than" or "smaller than" or other more flexible rule). This way the user can only filter after data selection. Provide solution to select according to rules applied on field values a priory and select according to multiple facets.

Fields that we want to use need to be included in the SOLR index, current bioatlas SOLR scheme: https://github.com/bioatlas/ala-docker/blob/develop/solr7/mycores/biocache/conf/schema.xml

ALA guide on Faceting and Filtering

ALA4R occurrence() function: https://rdrr.io/cran/ALA4R/man/occurrences.html