lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: help required ... ~ operator
Date Mon, 10 Dec 2007 10:04:58 GMT

On Dec 10, 2007, at 4:48 AM, Shakti_Sareen wrote:
>      I am using StandardAnalyzer() to index the data. I am getting  
> false
> hits in ~ operator query.
>
> Actual data is: "signals by magnets of different strength"
> and when I am parsing a query: "signals strength"~2  , I am getting a
> hit which is a false result.
>
> I am using QueryParser.
>
> Please help on this issue.

Chances are that you've got a stop word remover in the mix, and "by"  
and "of" are being removed, thus making the words close enough for a  
match.  The built in stop filter does not leave gaps for removed  
words.  So you could either use a custom stop filter or remove it  
altogether to keep those words there.

	Erik


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


Mime
View raw message