You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by "Angelov, Rossen" <Ro...@SourceMedia.com> on 2005/06/27 23:06:28 UTC

proximity search not working when extending the QueryParser

When I'm using the QueryParser directly, the proximity search works fine and
getPhraseSlop() returns the correct slop int.

The problem is when I extend QueryParser. When extending it, getPhraseSlop
always returns the default value - 0. It's like setPhraseSlop is never
called.

Does anybody know if I have to parse the query, get the slop number and
explicitly call setPhraseSlop to have the proximity working or there is a
completely different way of doing it when extending the QueryParser?

Thanks,
Ross

"This communication is intended solely for the addressee and is
confidential and not for third party unauthorized distribution."


Re: proximity search not working when extending the QueryParser

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
Ross - could you please show us a bit of your code so we can see  
explicitly what you're doing and how it's not working as expected?   
set/getPhraseSlop are quite straightforward, so unless you're mixing  
up the static versus instance parse methods with QueryParser then I  
don't know what could be wrong at this point.

     Erik

On Jun 27, 2005, at 5:06 PM, Angelov, Rossen wrote:

> When I'm using the QueryParser directly, the proximity search works  
> fine and
> getPhraseSlop() returns the correct slop int.
>
> The problem is when I extend QueryParser. When extending it,  
> getPhraseSlop
> always returns the default value - 0. It's like setPhraseSlop is never
> called.
>
> Does anybody know if I have to parse the query, get the slop number  
> and
> explicitly call setPhraseSlop to have the proximity working or  
> there is a
> completely different way of doing it when extending the QueryParser?
>
> Thanks,
> Ross
>
> "This communication is intended solely for the addressee and is
> confidential and not for third party unauthorized distribution."
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org