[Xapian-discuss] Giving titles extra weights and searching with titles

Olly Betts olly at survex.com
Thu Mar 30 14:43:53 BST 2006


On Wed, Mar 29, 2006 at 11:12:57PM +0100, Paul Dixon wrote:
> What's the best technique for giving the terms in, say, a document
> title more weight than the terms? Do I simply use the third "wdfinc
> "parameter to Xapian::Document::add_posting to give it more weight?

Yes.

> Secondly, if I wanted to make it possible to search just within a
> title, would I also need to store the same of terms prefixed with, say
> TITLE: to do that?

Yes.  The conventional prefix for subject or title is "S" - the
advantage of using this is compatibility with other Xapian databases
built by other applications.  For more information, see termprefixes.txt
in the omega documentation:

http://svn.xapian.org/*checkout*/trunk/xapian-applications/omega/docs/termprefixes.txt

Cheers,
    Olly



More information about the Xapian-discuss mailing list