ess-acppo / ag-bie

This repository has the code to the agriculture's implementation of ALA BIE
1 stars 4 forks source link

REST API / SOLR search expressions/filters, wildcard-s and their combination-s #20

Closed mbohun closed 4 years ago

mbohun commented 6 years ago

The following query returns 11 results:

curl -s 'https://sit-ag-bie.oztaxa.com/ws/search.json?fq=rk_kingdom:Animalia&fq=rank:phylum&pageSize=100&start=0&facets=rank&sort=scientificName' | jq '.searchResults.totalRecords'
11

HOWEVER if we try to combine the above query with q=a* then we get back 0 results:

curl -s 'https://sit-ag-bie.oztaxa.com/ws/search.json?q=a*&fq=rk_kingdom:Animalia&fq=rank:phylum&pageSize=100&start=0&facets=rank&sort=scientificName' | jq '.searchResults.totalRecords'
0

...ALTHOUGH q (q=a*) without any fq-s works fine (plus i did verify the other/sub-sequent args are used correctly, i did try this same query with-and-without sort=scientificName and the result was clearly different (sorted-vs-unsorted)):

curl -s 'https://sit-ag-bie.oztaxa.com/ws/search.json?q=a*&pageSize=100&start=0&facets=rank&sort=scientificName' | jq '.searchResults.totalRecords'
8678
moziauddin commented 4 years ago

This issue is released in v0.6