You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Quick question: is it correct that by applying filters (with where) we expect and ideally obtain the documents sorted? There is a reason why is not used the sortBy parameter? As a user, it seems to me more intuitive and less misleading
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: