AtlasOfLivingAustralia / galah-R

Query living atlases from R
https://galah.ala.org.au
38 stars 3 forks source link

`search_` functions don't return the closest matches to the search-term first #158

Closed daxkellie closed 1 year ago

daxkellie commented 1 year ago

When using search_ functions, results are usually returned in an order unrelated to the query (perhaps alphabetical?). This ordering has begun to cause issues with new show_values() and search_values() functions (#131), where only the first result of a query is returned, for example:

search_lists("dr") |> show_values()
#> ! Search returned 16 matched lists.
#> • Showing values for 'dr19022'.

It would be more useful if results from a search_ function were ordered by similarity to the search term. For example, the results of search_fields("year") would list year first, followed by subsequently less similar fields

daxkellie commented 1 year ago

Commit f709bd474a406a5bfd8567582957cf8effff3bad has added ordered searches for fields, profiles and lists