plazi / BLR-website

1 stars 0 forks source link

Treatment - fitler by RANK #31

Closed teodorgeorgiev closed 4 years ago

teodorgeorgiev commented 4 years ago

When I search in treatments for "carabus" for the facet "Rank" I get the following options:

Family (1) Subfamily (1) Subtribe (1) Tribe (1) family (1) genus (76) species (135) subGenus (82) subSpecies (5) subfamily (1) subspecies (53) tribe (1)

@myrmoteras Is that the expected result?

Also when I try to filter further by any of these I get 0 results.

myrmoteras commented 4 years ago

that is possible. The only question is what the genus (76) looks like. Are those what? I can't reproduce it in the sandbox.

tcatapano commented 4 years ago

when filtering by rank number next to rank does not correspond to number of results when filtering by that value

http://z2.punkish.org/v2/treatments?facets=true&stats=true&rank=genus&treatmentTitle=carabus

genus (3) but many more results

punkish commented 4 years ago

lovely bug report. Fixed!

trivia: 'order' and 'rank' are reserved words in SQL, so they have to be treated differently when used in a query. A regression had crept in, now fixed.

triva2: note that on the test server I have turned off caching. That means even repeated queries will be redone. This is to fish out the bad performing queries (please report). My logic is that if the API performs reasonably well without cache, then it will be super with cache. 😄

By the way, a bug report like this really should be under the Zenodeo issues. This was not a fault of the website. It was a bug in the API. Let's try and file the issues in the right place.