About id
in search scroll
#3201
-
Is this a purely formal requirement? Or do the results need to be sorted by ID for this to work effectively? Queries like this are not effective? SELECT `reputation`, `id` FROM `users_rt` ORDER BY `reputation` DESC, `id` DESC LIMIT 2; SHOW SCROLL; |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The results don’t have to be sorted by ID, but they should include sorting by ID. Of course, you can sort by other criteria as well. The key point is that by default, Manticore doesn’t sort results at all unless there’s a
|
Beta Was this translation helpful? Give feedback.
The results don’t have to be sorted by ID, but they should include sorting by ID. Of course, you can sort by other criteria as well. The key point is that by default, Manticore doesn’t sort results at all unless there’s a
MATCH()
orKNN()
statement in the query. Even then, fluctuations can still occur because multiple results may have the same weight or KNN distance. Sorting by ID helps prevent this issue.ORDER BY
reputationDESC,
idDESC
looks good to me.