[Xapian-discuss] Help with weights
Robert Kaye
rob at eorbit.net
Wed Jul 2 22:00:02 BST 2008
On Jul 1, 2008, at 6:14 PM, Olly Betts wrote:
> Are you adding this type term to queries? If not, the effect of
> indexing the type term with those termcounts will be to increase the
> document length of albums. That will tend to decrease the
> importance of
> each occurrence of "love" in the album title, so albums will indeed
> tend
> to rank lower.
Ah ha -- that explains it -- thanks.
> Xapian::Query album_boost("XTYPEalbum");
> album_boost = Xapian::Query(Xapian::Query::OP_SCALE_WEIGHT,
> album_boost, 4.2);
> query = Xapian::Query(Xapian::Query::OP_AND_MAYBE, query,
> album_boost);
OK, I see how that can be really useful. Since I am providing an end
user search service, should I write my own parser and generate my own
queries or should I post-process the results from QueryParser to tack
on the fields that would give the user better search results?
--
--ruaok Somewhere in Texas a village is *still* missing its idiot.
Robert Kaye -- rob at eorbit.net -- http://mayhem-chaos.net
More information about the Xapian-discuss
mailing list