Felix Antonius Wilhelm Ostmann
2007-Mar-07 16:40 UTC
[Xapian-discuss] one question about matchdecider
i use the perlbindings: first: the wrapper wont work perfect for the get_mset with diffent count of argument. $xapianMSet = $xapianEnquire->get_mset(0,10,$mdecider); is an alias for this (see Xapian/Enquire.pm line 52/53) $xapianMSet = $xapianEnquire->get_mset(0,10,0,0,$mdecider); WARN Search::Xapian::Enquire::get_mset1() -- rset is not a "Search::Xapian::RSet" object at /usr/local/lib/perl/5.8.4/Search/Xapian/Enquire.pm line 62, <STDIN> line 1. this work: $xapianRSet = Search::Xapian::RSet->new(); $xapianMSet = $xapianEnquire->get_mset(0,20,0,$xapianRSet,$mdecider); this is my matchdecider (just for testing): my %mdecider; my $mdecider = sub { my $host = $_[0]->get_value(1); # value 1 is a hostname if( $mdecider{$host} ) { print "o"; return 0; } else { print "x"; $mdecider{$host} = 1; return 1; } }; this is the output: xxxxxxxxxxxxxxxxxxxxxxxoxxxoxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx he checked 125 documents, 123 are accepted and 2 are declined ... but why he must check 125 documents? i just want 20 document. i thought he must accept 20 and then the matchdecider has done his work. why he check so much more documents? -- Mit freundlichen Gr??en Felix Antonius Wilhelm Ostmann -------------------------------------------------- Websuche Search Technology GmbH & Co. KG Martinistra?e 3 - D-49080 Osnabr?ck - Germany Tel.: +49 541 40666-0 - Fax: +49 541 40666-22 Email: info@websuche.de - Website: www.websuche.de -------------------------------------------------- AG Osnabr?ck - HRA 200252 - Ust-Ident: DE814737310 Komplement?rin: Websuche Search Technology Verwaltungs GmbH - AG Osnabr?ck - HRB 200359 Gesch?ftsf?hrer: Diplom Kaufmann Martin Steinkamp --------------------------------------------------
On Wed, Mar 07, 2007 at 06:24:25PM +0000, Olly Betts wrote:> On Wed, Mar 07, 2007 at 05:39:43PM +0100, Felix Antonius Wilhelm Ostmann wrote: > > WARN Search::Xapian::Enquire::get_mset1() -- rset is not a > > "Search::Xapian::RSet" object at > > /usr/local/lib/perl/5.8.4/Search/Xapian/Enquire.pm line 62, <STDIN> line 1. > > I'll fix that, thanks for reporting it.OK, fixed in SVN. Cheers, Olly