AtlasOfLivingAustralia / biocache-service

Occurrence & mapping webservices
https://biocache-ws.ala.org.au/ws/
Other
9 stars 26 forks source link

Should Biocache WS support query parameters that are not URL encoded? #886

Closed qifeng-bai closed 4 months ago

qifeng-bai commented 4 months ago

For example:
https://biocache-test.ala.org.au/occurrences/search?q=species_list_uid:dr21646&fq=decade:2020&fq=country:Australia&fq=first_loaded_date:[2023-02-07T13:00:00Z%20TO%20*]&fq=occurrence_date:[2023-02-07T13:00:00Z%20TO%20*]&sort=first_loaded_date&dir=desc&disableAllQualityFilters=true

returns no records without errors.

However, after we replaced species_list_uid:dr21646 with species_list_uid%3Ddr21646, the url returns occurences

adam-collins commented 4 months ago

Closing as the problem is in specieslist-webapp.

  1. species_list_uid is only usable for authoritative lists. e.g. https://biocache.ala.org.au/occurrences/search?q=species_list_uid:dr947
  2. species_list is what you want for non-authoritative lists. e.g. https://biocache.ala.org.au/occurrences/search?q=species_list:dr21646
  3. lists has a matching bug that prevents uploading a list with only taxonID. See https://github.com/AtlasOfLivingAustralia/specieslist-webapp/issues/299
  4. when you encode the colon you break the search. It ends up doing a search on the default catch all text field, i.e. the wrong results for this example.
qifeng-bai commented 4 months ago

@adam-collins However, in the Alerts, when we subscribe a list, it does not check if it is an authoritative list or not, it always use species_list_uit to construct its query