[Xapian-discuss] collapsing by one value and sorting by another

Olly Betts olly at survex.com
Sat Oct 17 22:36:55 BST 2009


On Sat, Oct 17, 2009 at 10:11:22PM +0200, Sascha Silbe wrote:
> I've found ways to use several sort keys (i.e. with the 2.+ only used if  
> the first returns equality), but nothing that would allow me to collapse  
> by a different value than the sort uses (values are often non-unique).

Just pass a different value slot number for the sorting and collapsing,
for example:

    enquire.set_sort_by_value(1);
    enquire.set_collapse_key(2);

Cheers,
    Olly



More information about the Xapian-discuss mailing list