Hi Eric, Yes, you are correct. This is a known bug, tracked here: https://issues.basho.com/show_bug.cgi?id=867
Best, Rusty On Fri, Apr 1, 2011 at 8:44 AM, Eric Moritz <e...@themoritzfamily.com>wrote: > 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: > > a, 0 > d, 1 > c, 2 > b, 3 > e, 4 > > 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: > > a, 0 > d, 1 > c, 1 > > 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? > > Eric. > > _______________________________________________ > riak-users mailing list > riak-users@lists.basho.com > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com >
_______________________________________________ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com