[Xapian-discuss] Phrase query problem with python api
Richard Boulton
richard at lemurconsulting.com
Thu Mar 15 11:51:02 GMT 2007
Victor Ng wrote:
> line 473, in __init__
> _xapian.Query_swiginit(self,_xapian.new_Query(*args))
> RuntimeError: unknown error in Xapian
>
>
> Aren't PHRASE queries allowed to take arbitrary subqueries or does it
> only allow some kinds of subqueries?
PHRASE queries aren't allowed to contain subqueries which are PHRASE or
NEAR subqueries. In SVN Xapian, the exception message from your code is
more helpful:
xapian.UnimplementedError: Can't use NEAR/PHRASE with a subexpression
containing NEAR or PHRASE
Actually, if I recall correctly, NEAR and PHRASE pretty much only accept
single-term subqueries currently, though I may be out of date on this
point. I've never needed to perform these kinds of queries - if you can
find examples of real-world queries which need support for this, it
might encourage someone to develop support for it sooner rather than later.
--
Richard
More information about the Xapian-discuss
mailing list