Closed nickdos closed 9 months ago
It appears that when querying with a common name, the autocomplete service returns the matched scientific name. This goes against the established pattern that the BIE (and thus most of the ALA) uses to autocomplete the "name" the user was typing.
So an associated fix is to provide a field (should be API compliant with BIE autocomplete is my feeling) that finishes the name the user was requesting - common name, ingenious name or scientific name.
The root cause of this issue is that biocache-service
(since pipelines) uses the ala-namematching-service
for autocomplete and it appears that the ala-namematching-service
does not autocomplete indigenous names.
There are also inconsistencies in the use of the autocomplete service between different webapps.
biocache-service
uses ala-namematching-service
http://namematching-ws.ala.org.au/api/autocomplete
biocache-hub
uses bie-index
https://bie-ws.ala.org.au/ws/search/auto.json
spacial-portal
used biocache-service
https://biocache.ala.org.au/ws/autocomplete/search
which in turn uses ala-namematching-service
bie-plugin
uses bie-index
autocomplete however the results list the commonName
property, it should list autocomplete commonNameMatches
or matchedNames
property.
We should standardise the autocomplete functionality across all service to either use bie-index
or biocache-service
. If we are to use biocache-service
then either the ala-namematching-service
will need to autocomplete on indigenous names or we switch back to using bie-index
for autocomplete.
@charvolant - can you advise on the comment above from @brucehyslop.
@brucehyslop We have a problem with indigenous names in that they're not cleared to go in to the name index itself, only the BIE. We've got two options here:
I agree that we should standardised autocomplete behaviour
@brucehyslop @charvolant Nat has confirmed that we already have permission to put the indigenous language words into the name index and make them searchable/viewable/usable in any part of the ALA. Please go ahead with the technical development
@elywallis @brucehyslop I'll assemble the new index with IEK names. This won't work for the current name index and namematching-ws autocomplete, since it doesn't have them. But it will work with the next name index.
And, on that subject, what do we want in the way of autocomplete functionality? I'd like to port the BIE behaviour over to the namematching-ws, since it (a) uses the lucene suggester and (b) has a scheme for weighting things to tend to return 'the number you first thought of'
Previously, when SP searches "red kangaroo" to https://bie.ala.org.au/ws/species/lookup/bulk, we got "Osphranter rufus", but now, we get an empty result, which breaks SP tests.
@qifeng-bai Is the request of the form
{
"vernacular": true,
"names": [
"red kangaroo"
]
}
@charvolant SP post { "vernacular": false, "names": [ "red kangaroo" ] }
And "vernacular: true" works
In that case, it's explicitly saying "do not look up vernacular names" It's been broken for some time but the recent fixes have, um, fixed it.
@charvolant So, should we set vernacular true or false in this case?
@qifeng-bai True in this case. This means that you'll also look for vernacular names.
Appears done because the previously empty result is no longer empty https://biocache-ws.ala.org.au/ws/autocomplete/search?q=Dhinawan
auto
service can include indigenous names via the BIE (in a practical and performant way)@nickdos commented on Wed Oct 13 2021
@elywallis raised this bug when testing indigenouse names.
I can confirm "Dhinawan" fails to work on the Add to map -> species page:
The autocomplete does not recognise the name and thus the "next" button remains inactive.
The BIE recognises it as "Emu" so not sure if that is the best UX...
@qifeng-bai commented on Wed Oct 13 2021
https://biocache-ws.ala.org.au/ws/autocomplete/search?q=Dhinawan returns empty
but https://bie.ala.org.au/search?q=Dhinawan returns results
@nickdos commented on Wed Oct 13 2021
OK, lets move this to biocache-service and see if there is a possibly fix there.