[Xapian-discuss] Higher weight on exact matches when doing wild card search

James Aylett james-xapian at tartarus.org
Tue Jun 7 18:53:43 BST 2011


On 6 Jun 2011, at 10:49, Thore Harald Høye wrote:

> I am working on a search which needs wild card support. Unfortunately this makes some searches for short words return bad results, because they match a lot of words that aren't related to what the user actually wants. I'm wondering if there's a good way to make specific matches get a higher weight than longer words?
> 
> Example: when search for car, documents containing car are more relevant than documents only containing carcass.


Could you parse the query twice, once with wildcard turned on, once without, and adjust the relative weighting of the two queries when you combine them?

J

-- 
 James Aylett
 talktorex.co.uk - xapian.org - devfort.com - spacelog.org






More information about the Xapian-discuss mailing list