Markus Wörle
2006-Oct-02 11:09 UTC
[Xapian-discuss] Search::Xapian::BM25Weight constructor problem
Hi! I'm currently using the xapian perl-bindings from http://www.oligarchy.co.uk/xapian/trunk/Search-Xapian-0.9.6.0.tar.gz. When I'm trying to create a new instance of Search::Xapian::BM25Weight (I have to do this because I want to adjust some parameters), e.g. my $bm25 = new Search::Xapian::BM25Weight(); I get this error message: Usage: Search::Xapian::BM25Weight::new1(THIS) at /usr/local/lib/perl/5.8.7/Search/Xapian/BM25Weight.pm line 19. Same problem when calling the new2 constructor implicit with new Search::Xapian::BM25Weight(k1, k2, k3, b, min_normlen); Creating an instance of Search::Xapian::BoolWeight() works fine. Calling the new1() or new2(k1, k2, k3, b, min_normlen) constructor directly leads to 'Search::Xapian::BM25Weight::new1() -- THIS is not a "Search::Xapian::Weight" object' and 'Search::Xapian::BM25Weight::new2() -- THIS is not a "Search::Xapian::Weight" object' respectively. Does anyone have a solution for me? Thanks in advance, mrks
Olly Betts
2006-Oct-02 11:39 UTC
[Xapian-discuss] Search::Xapian::BM25Weight constructor problem
On Mon, Oct 02, 2006 at 12:08:58PM +0200, Markus W?rle wrote:> Usage: Search::Xapian::BM25Weight::new1(THIS) at > /usr/local/lib/perl/5.8.7/Search/Xapian/BM25Weight.pm line 19.Could you try the attached patch? Cheers, Olly -------------- next part -------------- Index: XS/BM25Weight.xs ==================================================================--- XS/BM25Weight.xs (revision 63) +++ XS/BM25Weight.xs (working copy) @@ -3,14 +3,14 @@ PROTOTYPES: ENABLE BM25Weight * -BM25Weight::new1() +new1() CODE: RETVAL = new BM25Weight(); OUTPUT: RETVAL BM25Weight * -BM25Weight::new2(k1, k2, k3, b, min_normlen) +new2(k1, k2, k3, b, min_normlen) double k1 double k2 double k3
Markus Wörle
2006-Oct-02 11:55 UTC
[Xapian-discuss] Search::Xapian::BM25Weight constructor problem
Am 02.10.2006 um 12:38 schrieb Olly Betts:> On Mon, Oct 02, 2006 at 12:08:58PM +0200, Markus W?rle wrote: >> Usage: Search::Xapian::BM25Weight::new1(THIS) at >> /usr/local/lib/perl/5.8.7/Search/Xapian/BM25Weight.pm line 19. > > Could you try the attached patch?It works! Thanks a lot! :-) Regards, mrks