lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Angelov, Rossen" <Rossen.Ange...@SourceMedia.com>
Subject RE: proximity search not working when extending the QueryParser
Date Tue, 28 Jun 2005 14:55:06 GMT
Thanks for the response Erik.

I just realized that in my MultiFieldQueryParser that extends the
QueryParser I'm overwriting only getFieldQuery(String, String) and not
getFieldQuery(String, String, int). That will explain why getPhraseSlop
always returs 0.

May be I asked my question prematurely, so let me change the code, test it
and if there is still a problem I'll get back to the list for help.

Ross

-----Original Message-----
From: Erik Hatcher [mailto:erik@ehatchersolutions.com]
Sent: Monday, June 27, 2005 6:40 PM
To: java-user@lucene.apache.org
Subject: Re: proximity search not working when extending the QueryParser


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

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


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message