Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Fix string fields sorting #338

Merged
merged 2 commits into from
Sep 7, 2021
Merged

Conversation

shekhirin
Copy link
Contributor

@shekhirin shekhirin commented Sep 2, 2021

Resolves #333

curl checks
~ curl -s 'localhost:7700/indexes/movies/search' -d '{"sort": ["title:asc"], "limit": 30}' | jq -r '.hits | map(.title)[]'
#1 Cheerleader Camp
#Horror
#RealityHigh
#Roxy
#SquadGoals
$5 a Day
$9.99
'71
(2)
(500) Days of Summer
(Girl)Friend
*batteries not included
...And God Created Woman
...And Justice for All
...E fuori nevica!
.45
1
1 Mile To You
1 Night
10
10 Cloverfield Lane
10 giorni senza mamma
10 Items or Less
10 Rillington Place
10 Rules for Sleeping Around
10 Things I Hate About You
10 to Midnight
10 Years
10,000 BC
10,000 Saints~ curl -s 'localhost:7700/indexes/movies/search' -d '{"sort": ["title:desc"], "limit": 30}' | jq -r '.hits | map(.title)[]'
크게 될 놈
왓칭
뷰티플 마인드
노무현과 바보들
ハニー
Счастье – это… Часть 2
СОТКА
Смотри мою любовь
Позивний 'Бандерас'
Лошо момиче
Күлүк Хомус
Куда течет море
Каникулы президента
Ακίνητο Ποτάμι
Üç Harfliler: Beddua
È nata una Star?
Æon Flux
Ága
À propos de Nice
À Nos Amours
À l'aventure
¡Three Amigos!
Zulu Dawn
Zulu
Zulu
Zu: Warriors from the Magic Mountain
Zu Warriors
Zorro
Zorba the Greek
Zootopia

@shekhirin shekhirin force-pushed the fix/facet-string-sort branch 2 times, most recently from 8022703 to 31c8b7c Compare September 3, 2021 08:58
@shekhirin shekhirin force-pushed the fix/facet-string-sort branch from 31c8b7c to c2517e7 Compare September 3, 2021 08:58
@shekhirin shekhirin changed the title Fix string fields ascending sorting Fix string fields sorting Sep 3, 2021
@shekhirin shekhirin marked this pull request as ready for review September 3, 2021 09:01
@shekhirin shekhirin marked this pull request as draft September 3, 2021 09:21
@shekhirin shekhirin force-pushed the fix/facet-string-sort branch from af4c40d to c957b4c Compare September 3, 2021 14:52
@shekhirin shekhirin force-pushed the fix/facet-string-sort branch from c957b4c to 0be0955 Compare September 3, 2021 15:00
@shekhirin shekhirin marked this pull request as ready for review September 3, 2021 15:02
@curquiza curquiza requested a review from Kerollmops September 6, 2021 14:45
@curquiza
Copy link
Member

curquiza commented Sep 6, 2021

Thanks for your PR ❤️
Kero will review it as soon as possible

Copy link
Member

@Kerollmops Kerollmops left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from the fact that we use rand::thread_rng() which isn't seeded and therefore not easily reproducible, I like your fix. I forgot about this loop thing that I have done in the FacetNumberRevRange iterator and the reverse one only.

Thank you very much for your help again @shekhirin, merging ⚗️
bors merge

@bors
Copy link
Contributor

bors bot commented Sep 7, 2021

@bors bors bot merged commit 446ed17 into meilisearch:main Sep 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Possible issue when sorting documents lexicographically
3 participants