[Xapian-discuss] Faster Exact Phrases
Olly Betts
olly at survex.com
Mon Dec 18 03:20:17 GMT 2006
It struck me that a lot of the complication in the handling of phrases
is because we allow the terms to occur with gaps between them. However
in a lot of cases (probably the majority even), this generality isn't
actually used, and the window size is equal to the number of terms.
So I think it's worth considering a special case for handling such
"exact" phrases as the much simpler code path is likely to speed up
some cases. I'm hoping it might also serve as a basis for a better
implementation of the general case.
Here's a patch (which I think should apply cleanly to 0.9.9):
http://oligarchy.co.uk/xapian/patches/faster-exact-phrases.patch
If you try it out, let us know how it does.
Cheers,
Olly
More information about the Xapian-discuss
mailing list