[Xapian-discuss] Question from a new user of xapian: query term weight

Olly Betts olly at survex.com
Sun Apr 4 07:49:08 BST 2010


On Fri, Apr 02, 2010 at 04:23:15PM -0400, Ken Pu wrote:
> I've been a Lucene user for the past year, but lately, with most of my
> project moving to Python, I really love Xapian's clean python binding.
>  I can't seem to see how to boost a query term using Xapian's query
> syntax.  In Lucene, there is "hello^4 world^.2" to boost "hello" and
> suppress "world".  However, digging through Xapian's documentation, I
> only see that Xapian supports boosting of document terms (restricted
> to integers), but not query terms.

You can also boost at query time by any non-negative factor:

http://trac.xapian.org/wiki/FAQ/ExtraWeight

There's no syntax for this in the QueryParser currently though.

Cheers,
    Olly



More information about the Xapian-discuss mailing list