jdrever / ShropBotSoc

MIT License
2 stars 0 forks source link

GENERAL/PAGINATION: need to incorporate page links as well as Next and Previous #90

Closed jdrever closed 3 years ago

jdrever commented 3 years ago

Currently the NBN API doesn't always provide the total number of records for the query, so full pagination is impossible.

charlesroper commented 3 years ago

Additionally, the next/previous/page links should respect the current state of the tab. Currently, clicking next/prev always switches the tab back to map on small screens.

Created an issue for this: #97

jdrever commented 3 years ago

Pagination implemented for species records - still don't think we can implement for species search.

jdrever commented 3 years ago

Sophia does provide a possible route for species search:

I haven't used the explore/group functions much, and it does look like you can't sort on them and they don't give a total record count. I think it's because they are facet searches, which can be intensive and so perhaps the ALA have restricted what you can do with them.

An equivalent search using the occurrence search with a facet is:

https://records-ws.nbnatlas.org/occurrences/search?facets=common_name_and_lsid&q=data_resource_uid:dr782&flimit=-1&fq=common_name:Ivy*%20AND%20species_group:Plants+Bryophytes&fsort=index&pageSize=0

Does this work for you?

flimit = -1, returns all the facets pageSize = 0, means that no occurrence records are returned in the query

because it's a facet search, you can only sort by the count or the index (the field you are faceting on).