[Xapian-discuss] Search::Xapian::QueryParser,
and configurable NEAR distance?
Olly Betts
olly at survex.com
Tue Nov 29 04:04:25 GMT 2005
On Mon, Nov 28, 2005 at 05:52:17PM -0800, Eric Parusel wrote:
> Is it possible to tell the QueryParser when I say "word1 NEAR word3"
> that I'd like to specify a distance rather than the use the default of
> 10/11, etc?
Not at present, but it's a fairly simple addition. I'll try to
implement it before the next release.
In the short term, you can easily patch the sources locally. See
queryparser/queryparser_internal.cc line 551, and change the "+ 9"
to whatever you like (it's "number of terms in the NEAR phrase" + 9
so with two terms they must be within an 11 word span i.e. 10 words
apart).
Cheers,
Olly
More information about the Xapian-discuss
mailing list