Eric Parusel
2005-Nov-29 01:53 UTC
[Xapian-discuss] Search::Xapian::QueryParser, and configurable NEAR distance?
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? I've been searching through the docs to no avail... Thanks, Eric
Olly Betts
2005-Nov-29 04:04 UTC
[Xapian-discuss] Search::Xapian::QueryParser, and configurable NEAR distance?
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