You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{
"message": "Error from server at null: org.apache.solr.search.SyntaxError: Cannot parse '(raw_scientificName:\"Apis cerana (exotic strains': Lexical error at line 1, column 49. Encountered: <EOF> after : \"\\"Apis cerana (exotic strains\"", "errorType": "Query syntax invalid", "statusCode": 400
}
tbh I’m guessing it was the comma that caused the problem because it’s the common element among the 4 failed queries, but I could be wrong. I could easily remove it from the string, but I think it used to work, so thought I’d check
2 . Reported by @timhicks-ala via user support request
Filtering searches by collector appears broken - 400 errors on both AVH and regular Biocache, eg: https://biocache.ala.org.au/occurrences/search?q=taxa%3A%22Geophila%22&qualityProfile=ALA&fq=collector%3A%22Forster%2C+P.I.%22
This is the the request made to biocache-service: https://biocache-ws.ala.org.au/ws/occurrences/search?q=taxa%3A%22Geophila%22&fq=collector%3A%22Forster%2C%20P.I.%22&qualityProfile=ALA&start=0&pageSize=20&sort=first_loaded_date&dir=desc&qc=&facets=taxon_name%2Cfamily%2Ccommon_name%2Cspecies_group%2Cstate%2Csensitive%2Cmonth%2Coccurrence_decade_i%2Cbasis_of_record%2Cmultimedia%2Coccurrence_status%2Cinstitution_uid%2Cdata_resource_uid%2CcontentTypes&flimit=1
returns
{
"message": "Error from server at null: org.apache.solr.search.SyntaxError: Cannot parse 'recordedBy:\"Forster': Lexical error at line 1, column 20. Encountered: <EOF> after : \"\\"Forster\"", "errorType": "Query syntax invalid", "statusCode": 400
}
The text was updated successfully, but these errors were encountered:
Confirmed that the problem is indeed the comma in the fq. org.springframework.core.convert.support.StringToArrayConverter is used when there is a single fq and it splits on commas. Noting that this is appropriate for the facets parameter that is the same type String[].
The fault will always occur when there is a comma in a query with a single fq value. An ugly workaround is to add &fq= to the end of a request or swap the fq containing the comma with the q that does not.
The following query
https://biocache-ws.ala.org.au/ws/occurrences/search?fq=%28raw_scientificName%3A%22Apis%20cerana%20%28exotic%20strains%2C%20genotypes%20and%20sub-species%29%22%29%20AND%20decimalLongitude%3A%5B110%20TO%20154%5D%20AND%20decimalLatitude%3A%5B-55%20TO%20-10%5D%20AND%20%28year%3A%222022%22%29%20AND%20month%3A%5B12%20TO%20%2A%5D%20AND%20day%3A%5B5%20TO%20%2A%5D&disableAllQualityFilters=true&pageSize=0
returns
tbh I’m guessing it was the comma that caused the problem because it’s the common element among the 4 failed queries, but I could be wrong. I could easily remove it from the string, but I think it used to work, so thought I’d check
2 . Reported by @timhicks-ala via user support request
Filtering searches by collector appears broken - 400 errors on both AVH and regular Biocache, eg:
https://biocache.ala.org.au/occurrences/search?q=taxa%3A%22Geophila%22&qualityProfile=ALA&fq=collector%3A%22Forster%2C+P.I.%22
This is the the request made to biocache-service:
https://biocache-ws.ala.org.au/ws/occurrences/search?q=taxa%3A%22Geophila%22&fq=collector%3A%22Forster%2C%20P.I.%22&qualityProfile=ALA&start=0&pageSize=20&sort=first_loaded_date&dir=desc&qc=&facets=taxon_name%2Cfamily%2Ccommon_name%2Cspecies_group%2Cstate%2Csensitive%2Cmonth%2Coccurrence_decade_i%2Cbasis_of_record%2Cmultimedia%2Coccurrence_status%2Cinstitution_uid%2Cdata_resource_uid%2CcontentTypes&flimit=1
returns
The text was updated successfully, but these errors were encountered: