-
-
Notifications
You must be signed in to change notification settings - Fork 260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Geosearch default sorting (asc) it's not handled during data loading #547
Comments
@micheleriva do you think this is a bug that is worth to be explored? If yes, I'd like to try! |
@debiff go ahead :) |
Quick question: is it correct that by applying filters (with |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Hello, i was trying the geosearch feature of Orama (and it's awesome!) and i was searching how the sorting systems works in this scenario. At first point, seems like there's no sorting, and sorting of data retrieved depends on documents sort inside database (first inserted will be put as first result, second inserted as second result and so on...).
I started to investigate inside code, and i found here (searchByRadius function) a default sorting. So i didn't understand why results don't maintain this sorting.
I figured out the problem, it is the scoring associated with the result. When you use the location search system, and you don't specify other terms, the scoring system assign default 0 value to records, and then the score sorting lose the default sorting made initially by the searchByRadius function.
I don't know if one possible way could be to attach the distance calculated by geosearch feature as score of docs, and use that as sorting parameter.
To Reproduce
{ entityId: 'string', location: 'geopoint' }
Expected behavior
Expected
Got
Environment Info
Affected areas
Search
Additional context
No response
The text was updated successfully, but these errors were encountered: