Break score ties in patient search results #320
Labels
bug
Something isn't working
feature/patients
This issue is about the patients functionality
feature/search
This issue is about searching the data in general
ux
This issue is about the user experience in general.
Milestone
Currently sorted order of results can change if their score is the same. Then pagination is difficult to work with because an item could appear on different pages with the same text query and database state. This can happen for instance when going from page 1 to page 2 of the results. To make this predictable we need to use a compound index to break ties. Maybe
{...textIndexFields, lastname: 1, firstname: 1, niss: 1, birthdate: 1}
. See https://docs.mongodb.com/manual/core/index-text/#std-label-text-index-compound and https://stackoverflow.com/questions/31652975/mongodb-how-to-do-a-text-search-and-sort-by-a-date.The text was updated successfully, but these errors were encountered: