[Xapian-discuss] Re: I need a function set_sort_by_relevance_then_value()

Olly Betts olly at survex.com
Mon Mar 6 18:53:51 GMT 2006


On Tue, Mar 07, 2006 at 01:36:06AM +0900, Sungsoo Kim wrote:
> Yes I will try, but it is not as simple as I expected. Maybe I need to add 
> a boolean variable, and if new function is added the xapian-binding
> modules also should be modified. So I wonder it would be better
> that all of set_sort_by_*() functions merged into one function just like 
> the deprecated set_sorting().

I think the API is clearer with the separate functions.  Not all the
sorting methods take the same parameters (set_sort_by_relevance doesn't
take a value or direction) so lumping them together feels somewhat
unnatural.

Don't worry about wrapping it in the bindings - that's easy enough (for
SWIG it's literally just a matter of copying the method prototype from
xapian-core/include/xapian/enquire.h to xapian-bindings/xapian.i).

Cheers,
    Olly



More information about the Xapian-discuss mailing list