AtlasOfLivingAustralia / ala-namematching-service

Service for ALA name matching to aid pipelines integration
Other
1 stars 4 forks source link

getByTaxonID returning the wrong taxon #53

Open charvolant opened 2 years ago

charvolant commented 2 years ago

https://namematching-ws.ala.org.au/api/getByTaxonID?taxonID=https://id.biodiversity.org.au/name/apni/245363&follow=true returns the result for https://id.biodiversity.org.au/taxon/apni/51305464 (the parent taxon) rather thanHibbertia ericifolia subsp. acutifolia.

Also true for follow=false

charvolant commented 1 year ago

Also true for https://namematching-ws.ala.org.au/api/getByTaxonID?taxonID=https%3A%2F%2Fid.biodiversity.org.au%2Fname%2Fapni%2F51306801&follow=false

charvolant commented 1 year ago

And also https://namematching-ws.ala.org.au/api/getByTaxonID?taxonID=https%3A%2F%2Fid.biodiversity.org.au%2Fname%2Fapni%2F50679896&follow=false

charvolant commented 1 year ago

The cause of this seems to be a bug in the merging of synthetic names during combined index construction. The synthetic parent taxon inherits the scientificNameID, which is also used as a taxonID for the original taxon. This causes an erroneous lookup in the identifier index.