[Xapian-discuss] Xapian's scoring/sorting compared to Google's

Henry henka at cityweb.co.za
Wed Dec 17 11:30:55 GMT 2008


Quoting "Olly Betts" <olly at survex.com>:
> My suggestion for using a "page reputation" score such as PageRank would
> be to apply an extra weight contribution to each match using
> Xapian::PostingSource, though that's not been in a release yet so you'll
> have to use SVN trunk at present.

This sounds ideal - I've been perusing the API for PostingSource and  
I'm not clear on where it fits into the (search) scheme of things --  
being relatively new to Xapian :)

Given a typical (simple) scenario:

$enq = $db->enquire($qp->parse_query($q));
$enq->set_sort_by_relevance_then_value(1);
...
my @matches = $enq->matches(...);
foreach my $match (@matches) {
   # display results
}

By your description above "...apply an extra weight contribution to  
each match..." the implication seems to be that I can use  
PostingSource to somehow influence each match's weight with an  
additional factor (eg, pagerank), and subsequent sort order.

I'm guessing it's not as simple as I think, right?  I have a hunch  
that the existing enquire/set_sort/matches flow will change into  
something else...

Thanks
Henry





More information about the Xapian-discuss mailing list