[Xapian-discuss] Xapian JNI questions
Alex Kushkuley
kushkuley at gmail.com
Thu Dec 7 18:19:19 GMT 2006
Thanks for the reply.
I have added one specific comment below.
Alex
> If you want to just use a MatchDecider, you need to subclass it and pass an
> instance of your subclass to get_mset() like this (this is a pointless
> matchdecider which rejects everything):
>
> class MyMatchDecider implements MatchDecider {
> public boolean accept(Document d) { return false; }
> }
>
> // ...
>
> MSet mset = enquire.getMSet(0, 10, null, new MyMatchDecider());
>
> However, this doesn't work for me:
>
> Exception in thread "main" java.lang.NoSuchMethodError: <init> (J)
> at org.xapian.Enquire.getMSet(Enquire.java:107)
> at SmokeTest.main(SmokeTest.java:116)
> FAIL: SmokeTest.class
>
>
>Looking at the code, I think it's trying to find the constructor for
>org.xapian.Document as "<init> (J)". Is that the right thing to look
>for?
Yes. I tried
ctorid = env->GetMethodID(documentclass, "<init>", "(J)V");
in opertor() function of JavaMatchDecider in java/native/Enquire.cc
and that worked!
More information about the Xapian-discuss
mailing list