Solr Sorting Bug in Riak Search?
eric at themoritzfamily.com
Fri Apr 1 08:44:38 EDT 2011
Hi, I was just digging through the riak search code and I think there
may be a bug, but I may be mistaken (my Erlang isn't that great).
It appears that the search is performed, sorted by score, sliced using
the start and rows values. After that happens, if there is a sort
param, the results are then sorted by
the sort param.
If this is correct, then there appears to be a bug that will provide
unexpected sorting. For instance. Let's say we have the results:
where index 0 is the value and index 1 is the score. Here the result
is sorted by the score. If we limit the result to 3 items we have:
Then we sort by the value:
a, c, d
I would expect that sorting by the value would return the following list:
a, b, c
because that is the order of the entire search result not the limited
set. By limiting the query set before the sort is performed, it is
possible to not receive values that should be in the list.
Is this correct?
More information about the riak-users