[Xapian-discuss] Does Xapian support value in [value1, value2, value3...]?

Olly Betts olly at survex.com
Tue Aug 2 13:50:43 BST 2011


On Wed, Jul 27, 2011 at 11:06:27AM -0300, Bruno Rezende wrote:
> what would be the difference if one did:
> 
> (value=value1 OR value=value2 OR ...)

That's not really an efficient approach with values (I'm assuming we're
talking about "value" in the sense of a Xapian document value, i.e.
what you'd add with Document::add_value()).

If you want to take that approach, index "value=value1", etc as prefixed
terms (e.g.  XVALUEvalue1) and then you just have an OR of several
terms.  That'll work well if there's a sane limit on the number of terms
you want to search for at once (hundreds is certainly OK, millions
almost certainly isn't).

Cheers,
    Olly



More information about the Xapian-discuss mailing list