NAME
Senna::Records - A Collection Of Records (sen_records)
METHODS
open
close
next
curr_key
nhits
sort
Sorts the records, discarding results if the total number of records exceed limit
.
$records->sort($limit);
If you want to control the sort order (ascending/descending), specify a second argument which can be a HASHREF
$records->sort($limit, { mode => SEN_SORT_ASCENDING });
$records->sort($limit, { mode => SEN_SORT_DESCENDING });
Beware, though, that according to the senna documentation, by specifying not sort options the results are sorted by score (descending), and if you specify the mode (without any compar args), the results are sorted by the keys.
Please note that the custom comparison operator is currently not supported. Patched welcome!