humlab-sead / sead_query_api

.NET Core port of Query SEAD API
Other
2 stars 0 forks source link

Construction types filter har många dubbletter, plus output saknas #105

Closed Maanin00 closed 8 months ago

Maanin00 commented 1 year ago
  1. Filtret innehåller många rader med samma text. T.ex. finns två rader för "Enkelstuga", vad är det som skiljer dem åt?

bild

  1. Oavsett vad man väljer i filtret failar anropet (internal server error 500) och sökindikatorn snurrar i all oändlighet.
johanvonboer commented 1 year ago
SELECT category, count(value) AS count FROM (SELECT tbl_sample_group_descriptions.sample_group_description_id AS category, tbl_analysis_entities.analysis_entity_id AS value FROM tbl_analysis_entities
INNER JOIN tbl_datasets ON tbl_datasets.dataset_id = tbl_analysis_entities.dataset_id
INNER JOIN tbl_physical_samples ON tbl_physical_samples.physical_sample_id = tbl_analysis_entities.physical_sample_id
INNER JOIN tbl_sample_groups ON tbl_sample_groups.sample_group_id = tbl_physical_samples.sample_group_id
INNER JOIN tbl_sample_group_descriptions ON tbl_sample_group_descriptions.sample_group_id = tbl_sample_groups.sample_group_id
INNER JOIN tbl_sample_group_description_types ON tbl_sample_group_description_types.sample_group_description_type_id = tbl_sample_group_descriptions.sample_group_description_type_id
INNER JOIN tbl_sites ON tbl_sites.site_id = tbl_sample_groups.site_id WHERE 1 = 1 
GROUP BY tbl_sample_group_descriptions.sample_group_description_id, tbl_analysis_entities.analysis_entity_id) AS x GROUP BY category;
johanvonboer commented 1 year ago

Jag kommer att ta ut detta filtret ur klienten, tills vidare, då det inte fungerar.

johanvonboer commented 1 year ago

Have a look at tbl_sample_group_descriptions and check for doubles.

johanvonboer commented 8 months ago

Detta filtret efterfrågas även av dendro-folket. Ger i nuläget 500 internal server error när man väljer något.

roger-mahler commented 8 months ago

Two errors fixed in this issue:

  1. Duplicate entries in facet resolves by adding sample_group_name to displayed text.
  2. SQL query generation of discrete facets produced queries with wrong join table sort order.
roger-mahler commented 8 months ago

Deployed to staging.