theCrag / website

theCrag.com: Add your voice and help guide the development of the world's largest collaborative rock climbing & bouldering platform
https://www.thecrag.com/
110 stars 8 forks source link

same route multiple times in the faceted search result #2407

Open nicHoch opened 7 years ago

nicHoch commented 7 years ago

if i am looking for routes set by persons A, B or C:

https://www.thecrag.com/climbing/spain/alto-mijares/routes/by/@nickyhochmuth+@carlosdediosarribas+@maestoe/?sortby=at,desc

the routes in the result list are duplicated.

might also apply to other search combinations?

brendanheywood commented 7 years ago

This isn't as simply de-duping the results using 'unique' in the sql, for most queries we can but for the cases where we are sorting by fa date we want multiple records so we show when it was first ascended as well as set / and or ffa

DaneEvans commented 5 years ago

This also occurs for a single name, when it is present in both the FA and Setter fields.

https://www.thecrag.com/climbing/australia/routes/by/monteith/?sortby=at,desc

It feels like strange behavior for a general search, though I see the reason if you are ordering by date... maybe a checkbox that says ignore duplicates? I feel like the situations where you want duplicates are far less common than those where you don't

brendanheywood commented 5 years ago

I think a small thing that would help is merging the records if they have the same date. A lot of routes have a duplicate.

We can possible also do a collapsing of adjacent duplicates. Instead of a tickbox I think we'd have 2 sort methods one with dups and one without. For the one without duplicates we'd just pick the earliest date as the sorting date.