[Xapian-discuss] Exclude field in query
David Levy
dvid.levy at gmail.com
Tue Feb 14 15:36:40 GMT 2006
Dealing with scriptindex, would it mean that :
name: index index=S field=caption value=5 index=XALLBUTDESC
brand: index index=XBRAND field=brand index=XALLBUTDESC
description: unhtml index field=sample
?
So my queries using the prefix XALLBUTDESC will search in "name" and "brand"
fields only ?
Thanks !
On 2/14/06, Olly Betts <olly at survex.com> wrote:
>
> On Mon, Feb 13, 2006 at 03:15:21PM +0200, David Levy wrote:
> > I wonder if it is possible to exclude a certain field in a probabilistic
> > query.
> > For instance, I want to search a term in all my indexed fields *but* in
> the
> > "description" field, which is too large and not so interesting for this
> very
> > query.
>
> What you need to do is decide which field or fields map to a particular
> term prefix.
>
> So if you want to be able to search "all fields but description", you
> need to generate terms with prefix <X> from all fields except
> description. Note that <X> may be empty (that's all the fields you
> want to search by default).
>
> It's also possible you could generate terms from each field separately
> (or for particular groups of fields) and OR them at query generation
> time, but the QueryParser class doesn't support that at present.
>
> > Maybe I should create another xapian database without this description
> field
> > ....?
>
> It's probably better to just add it to the same database with a
> different prefix. That way you don't have a duplicate the record
> table, etc.
>
> Cheers,
> Olly
>
--
David LEVY {selenium}
Website ~ http://www.davidlevy.org
Wishlist Zlio ~ http://david.zlio.com/wishlist
Blog ~ http://selenium.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.tartarus.org/pipermail/xapian-discuss/attachments/20060214/8b1f7724/attachment.htm
More information about the Xapian-discuss
mailing list