[Xapian-discuss] Re: Question about sorting using the Java bindings.

Olly Betts olly at survex.com
Wed May 30 22:52:01 BST 2007


On Wed, May 30, 2007 at 08:26:14PM +0000, Jarrod Roberson wrote:
> I have the sorting by value working, but I can't change the direction.
> So is it possible to control the sort order using the Java bindings?

No.  Java still wraps the old C++ API for sorting which didn't allow
the order to be controlled, so that's not currently possible.

Some good news though - I've started working on new Java bindings
implemented using SWIG.  If you download SVN snapshot 8770 or later
then you can try them out - configure as usual, and then:

cd java-swig
make

Snapshots are here (but note that 8770 hasn't yet built as I write):

http://oligarchy.co.uk/xapian/trunk/

I've tried to wrap things the same way as the JNI bindings do, but
sometimes this isn't easy to achieve - for example, MatchDecider and
ExpandDecider are classes in the SWIG generated code, whereas the JNI
code had them as interfaces (which is a more natural way to do it in
Java, but I failed to see how to keep that easily).

I don't seem to have a useful TODO list, but there is still work to be
done.  If you (or anyone else) wants to try them, let me know what fails
for you and I can work on that next.

Cheers,
    Olly



More information about the Xapian-discuss mailing list