Ken Pu
2010-Apr-02 20:23 UTC
[Xapian-discuss] Question from a new user of xapian: query term weight
Hi all, 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. Any help would be deeply appreciated. Ken Pu
Olly Betts
2010-Apr-04 06:49 UTC
[Xapian-discuss] Question from a new user of xapian: query term weight
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