[Xapian-discuss] Searching in different fields

Olly Betts olly at survex.com
Wed Dec 27 15:36:43 GMT 2006


On Wed, Dec 27, 2006 at 10:21:08AM +0100, Felix Antonius Wilhelm Ostmann wrote:
> Hmmm ... i am not shure, but perhaps you can use a hack:
> 
> enter the username many times :)
> 
> smaarten3 =>
> XUsmaarten3, XUmaarten3, XUaarten3, XUarten3, XUrten3, XUten3, XUen3, 
> XUn3, XU3
> 
> for one field with termlength ~ 10 digits it should be userfull.

If you apply this to the terms you're generating, it'll work for any
field.  It will generate a lot of terms for larger fields though,
but you probably don't want to store positional information for them so
it shouldn't be too bad.

Richard had a patch for something like this, but I can't seem to find
any trace of it now.

> Perhaps you must use a speciall prefix like XUS for the short notations.

You'll need to if you also want to match unwildcarded terms on the
same field.

> i dont know how you get this feature with omega :(

Patching the QueryParser class would be the best way I think.

Cheers,
    Olly



More information about the Xapian-discuss mailing list