[Xapian-discuss] Working Demo for WWW Search Engine

Olly Betts olly at survex.com
Wed Mar 1 00:06:12 GMT 2006


On Tue, Feb 28, 2006 at 11:55:27PM +0000, Olly Betts wrote:
> On Tue, Feb 28, 2006 at 01:22:21PM -0800, Kevin SoftDev wrote:
> > url   : unique=Q weight=2 field=url
> > title : index    weight=3 field=title
> > body  : index    weight=1 field=body

Oh, and you probably want to add a boolean term as well as checking for
one (that probably should be warned about, though it's possible you could
use "unique" without a corresponding "boolean" in some clever way).  Plus
"weight" is only useful for a probabilistic field.  So the index script
would probably be:

url   : unique=Q boolean=Q field=url
title : weight=3 index     field=title
body  : weight=1 index     field=body

If title and body can be arbitrarily long you might also want to add
a truncate, e.g. to index the whole of body but store at most 300
characters of it in the field:

body  : weight=1 index truncate=300 field=body

Cheers,
    Olly



More information about the Xapian-discuss mailing list