Closed timhicks-ala closed 1 year ago
When we query on a large number of species in a small area: for example: https://lists.ala.org.au/speciesListItem/list/dr9884 [Global Register of Introduced and Invasive Species - Australia] has 3838 species
It has total ~17000 records: https://biocache.ala.org.au/ws/occurrences/search?q=qid:1646267417855
However, it will get timeout error, if we try to fetch all records: https://biocache.ala.org.au/ws/occurrences/search?facet=false&pageSize=0&q=qid:1646267417855
Wonder if Solr performs slow with a large number of OR statement
From @nickdos
this list is authoritative https://lists.ala.org.au/speciesListItem/list/dr494 and link goes to https://biocache.ala.org.au/occurrences/search?q=species_list_uid%3Adr494 But a non-authoritative list like https://lists.ala.org.au/speciesListItem/list/dr7971 goes to https://biocache.ala.org.au/occurrences/search?q=qid%3A1646609135147
Someone at ALA. If you edit the list metadata, a user with ROLE_ADMIN can click the option for authoritative. It only takes effect after the next full index of Biocache. For users adding a list via the SP interface, this is not a solution. But for adding species using one of the standard lists (conservation lists or similar), then the SP should be using the q=species_list_uid:dr494 syntax.
SOLUTION:
1, if a list is authoritative, Biocache built query based on species_list_uid, we can use this query: q=species_list_uid: dr494
2, Pop up warning if a user tries to upload >200 species in a list.
3, Pop up warning if a user tries to use use a user loaded list which contains > 200 species
4, Also, check if those changes apply 'Exporting points' function
PR: https://github.com/AtlasOfLivingAustralia/spatial-hub/pull/435
TEST: Case one: Add species -> Use species list -> Type "griis" in search box -> Should see a list of GRIIS, one with 'ok-circle' icon (It stands for 'Authoritative species list ') -> choose this one -> Choose 'Australia' -> Next
Wait few time, you should see records rendered on the map.
Case two: If you choose another list of GRIIS, which contains 2,979 species, you should see a warning: Note: only the first 200 names will be used when when adding species to the map (for user-uploaded checklists)
You can continue , but it takes long time
Also reported in https://support.ehelp.edu.au/a/tickets/146232 - user attempting to use a species list with 3,700 entries.
Tested and passed
Adding large lists of species to an area in Spatial seems to fail by hanging/perpetually waiting. An example of a list that fails is the GRIIS Australia list, at ~3800 species: https://lists.ala.org.au/speciesListItem/list/dr9884
Adding a smaller list (~2100 - Advisory List of Rare or THreatened Plants in Victoria 2014) seems to complete, and the dialog box to add species disappears, but no occurrence dots appear on the map.
This seems to occur with an area of any size - I get the same results with a shapefile supplied by a user, and also a tiny city-sized polygon. The GRIIS list was the one attempted by the user.
The practical upper limit for adding a species list to SP seems to be at or below 1,000 species in a single list.
Issue reported in https://support.ehelp.edu.au/a/tickets/126609