Matt Chaput
2010-Mar-03 03:55 UTC
[Xapian-devel] How the matcher knows when to prune and decay
Hi all, I have a question about Xapian internals, and since I don't speak enough C++ to find out the answer from the source code, I thought I'd ask here. Since Xapian can prune or mutate the matching tree based on the largest possible future score from the branch, I assumed Xapian stored postings in decreasing order of frequency/weight/whatever. But recently I found some documentation that said Xapian stores postings in document order. So I'm wondering, how does the matcher know the maximum score of the rest of the postings in a branch? Thanks for your time! Matt
Olly Betts
2010-Mar-03 23:28 UTC
[Xapian-devel] How the matcher knows when to prune and decay
On Tue, Mar 02, 2010 at 10:55:24PM -0500, Matt Chaput wrote:> So I'm wondering, how does the matcher know the maximum score of the rest of > the postings in a branch?It asks the subtree for its maximum score, which the subtree calculates recursively. That maximum can decrease during the matching process - for example, when a child of OP_OR reaches its end. Cheers, Olly