[Xapian-discuss] constructing phrase queries

Richard Boulton richard at tartarus.org
Thu Sep 30 11:31:18 BST 2004


On Thu, 2004-09-30 at 09:21 +0100, James Aylett wrote:
> Yes - I /think/ that only phrase searches (PHRASE/NEAR) require you to
> be able to use more than two terms in a query constructor. (Is this
> right? It may be more efficient, but I don't think it changes the
> expressability ...) Complex queries are trees - so you can construct
> the tree explicitly by building bits of the tree individually and
> glueing them together.

I think it needs to be possible to pass OP_ELITE_SET nodes an arbitrary
list of terms, too.

> That would be an interesting extension, equivalent to the query parser
> but a good deal more powerful. I don't know exactly what the grammar
> of get_description() is, but I doubt it would be all that difficult to
> do ...

I'm not sure that get_description() currently correctly escapes the
necessary characters (eg, ':').  Ensuring that such escaping happens
both ways is the only pitfall I can think of to this plan.

-- 
Richard Boulton <richard at tartarus.org>




More information about the Xapian-discuss mailing list