[Xapian-discuss] Matching exact phrases only
Chris Good
chris at g2.nu
Tue Aug 8 17:53:33 BST 2006
James Aylett wrote:
> Yes, you're right - that isn't exposed. Try the following patch
> (untested, but it builds at least :-):
Well it seems to work after a fashion:
CHEQUERS CENTRE Weight 8.348862 100% relevant, matching: centre
EVERSLEY CENTRE Weight 8.348862 100% relevant, matching: centre
TOWN CENTRE Weight 8.348862 100% relevant, matching: centre
FIELDHEAD BUSINESS CENTRE Weight 7.463948 89% relevant, matching: centre
Unfortunately it's not quite achieving what we're after as the weights
are pretty similar between exact document matches and non-exact ones. All of
those results above are ones that we'd want to ignore as they're too
imprecise, by way of couter-example for "london" we get:
LONDON Weight 8.515918 99% relevant, matching: london
CENTRAL LONDON Weight 7.506283 88% relevant, matching: london
LITTLE LONDON Weight 7.506283 88% relevant, matching: london
LONDON APPRENTICE Weight 7.506283 88% relevant, matching: london
Of those We actually only care about the "LONDON" match. So we could set
a threshold of say 98% and then look at the weights if the relevance
was above that threshold but the weights don't seem to distinguish
between precise and imprecise matches either, at least not in any way
that we could sensibly apply a cutoff.
More information about the Xapian-discuss
mailing list