[Xapian-discuss] Proximity in Xapian?
olly at survex.com
Fri Dec 8 04:47:14 GMT 2006
On Wed, Dec 06, 2006 at 10:56:19AM +0500, Sharjeel Ahmed Qureshi wrote:
> Olly Betts wrote:
> >This is mentioned in overview.html, for example here:
> > Xapian::Query::OP_NEAR Return documents where the terms are with the
> > specified distance of each other.
> > Xapian::Query::OP_PHRASE Return documents where the terms are
> > with the specified distance of each other and in the given order.
> The document explains what OP_NEAR and OP_PHRASE do but does not give
> any clue of how Xapian applies these operators. For example the
> execution tree of OP_OR and OP_AND etc but does not give any information
> about proximity based operators.
They're just like OP_AND (since a document must contain all the terms in
order to contain all the terms close together!) except that documents
which don't match the additional positional criterion are also rejected.
> >There's no proximity based relevance at present.
> Is there any plan of adding proximity based relevance in future?
I've no particular plans to work on it in the near future, except that
I've been wondering about adding an "auto-phrase" mode to the
QueryParser in which a simple query string without operators would be
OR-ed with a phrase version of the same query, e.g.:
foo bar -> (foo bar) OR "foo bar"
I suspect you have something more complicated in mind though. It's
possible somebody else has more ambitious plans.
More information about the Xapian-discuss