On 20 Feb 2013, at 10:22, QE :: Felix Ostmann wrote: > You simple need another value with sticky true-false i think: > Xapian::MultiValueKeyMaker sorter; > sorter.add_value(3); > sorter.add_value(1, true); > enquire.set_sort_by_key(&sorter, true); > Xapian::MSet mset = enquire.get_mset(0, 10); I didn't spot the MultiValueKeyMaker. Amazing. Thanks!