AtlasOfLivingAustralia / avh-hub

Australian Virtual Herbarium
https://avh.ala.org.au
Mozilla Public License 2.0
4 stars 2 forks source link

Taxon name search in Advanced search is broken #132

Closed nielsklazenga closed 2 years ago

nielsklazenga commented 2 years ago

Try: image

Both with matched and provided names there are no results:

https://avh.ala.org.au/occurrences/search?taxa=taxa%3A%22Agrostis+venusta%22&q=taxa%3A%22Agrostis+venusta%22

I think this might be because the query terms is duplicated.

Same search works fine in the Biocache:

https://biocache.ala.org.au/occurrences/search?q=taxa%3A%22Agrostis+venusta%22&fq=data_hub_uid%3Adh9.

nickdos commented 2 years ago

Ah I think I know why... this issue moved some duplicated functionality between hubs and service so it is now only handled by the service. AVH has a custom taxon search form so it wasn't "fixed" to not perform the same duplicated code.

nickdos commented 2 years ago

@Rita-C I think we should push out a fix for this ASAP, so I've assigned to you. We should also update the AVH test doc to include testing the advanced taxa search for future testing.

Rita-C commented 2 years ago

Note https://biocache-ws-test.ala.org.au/ws/occurrences/search?q=text%3A%22taxa%3A%22Agrostis%20venusta%22%22%20AND%20taxa%3A%22Agrostis%20venusta%22&disableAllQualityFilters=true&start=0&pageSize=20&sort=first_loaded_date&dir=desc&qc=data_hub_uid%3Adh9&facets=taxon_name%2Cgenus%2Cfamily%2Ckingdom%2Ccommon_name%2Crank%2Cspecies_group%2Ctaxonomic_issue%2Ctype_status%2Ccountry%2Cstate%2Ccl958%2Ccl959%2Ccl927%2Csensitive%2Cgeospatial_kosher%2Ccollectors%2Cmonth%2Coccurrence_decade_i%2Cstate_conservation%2Cbasis_of_record%2Cmultimedia%2Coccurrence_status_s%2Csensitive%2Cassertions%2Coutlier_layer%2Coutlier_layer_count%2Cuser_assertions%2Cduplicate_type%2Ccollection_uid%2Cinstitution_uid%2Cdata_provider_uid%2Cdata_resource_uid%2Cdataset_name&flimit=10 shows error.

nickdos commented 2 years ago

biocache-test SOLR is a bit broken ATM - Bia has been looking into it.

nickdos commented 2 years ago

That query looks a bit wierd... q=text:"taxa:"Agrostis venusta"" AND taxa:"Agrostis venusta" has too many fields in it.

The text: bit should not be there. Should be q=taxa:"Agrostis venusta"" AND taxa:"Agrostis venusta" I think.

This works.

Rita-C commented 2 years ago

2.1.14-SNAPSHOT deployed to avh-test "acacia" as Taxon name on advance search tab works, please QA and review @nickdos

nickdos commented 2 years ago

Code reviewed ✅ ~Yep, works like a bought one ✅~ Edit: selecting the option "Supplied name" above the inputs, results in it using the "Matched name" - so that option is not being read...

Rita-C commented 2 years ago

Code reviewed ✅ ~Yep, works like a bought one ✅~ Edit: selecting the option "Supplied name" above the inputs, results in it using the "Matched name" - so that option is not being read...

Thanks @nickdos. The option is not being read was due to this change in biocache-hubs, given the same variable nameType is used by multiple apps, e.g. avh-hub and biocache-hubs, it's best to update biocache-hubs code.

New ticket created https://github.com/AtlasOfLivingAustralia/biocache-hubs/issues/547