[Xapian-discuss] one question about matchdecider

Felix Antonius Wilhelm Ostmann ostmann at websuche.de
Wed Mar 7 16:39:43 GMT 2007


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 at 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
--------------------------------------------------



More information about the Xapian-discuss mailing list