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 Sonu SR <so...@gmail.com> on 2007/09/07 10:02:44 UTC

How to distinct phrase matches between lines

Hi,
Is there a way to distinct adjacent words between lines. I have problem
while searching a phrase. Since I am using stopword analyzer, the newlines
starting with stopwords are ignored in phrase search. So, such documents
comes as search result.

Please help me to solve this issue.

Thanks,
Sonu

Re: How to distinct phrase matches between lines

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Sep 7, 2007, at 4:02 AM, Sonu SR wrote:
> Hi,
> Is there a way to distinct adjacent words between lines. I have  
> problem
> while searching a phrase. Since I am using stopword analyzer, the  
> newlines
> starting with stopwords are ignored in phrase search. So, such  
> documents
> comes as search result.

You want phrase searches not to match across lines?   If you're  
indexing each line as a separate Field instance, you can set the  
position increment gap to something greater than the maximum phrase  
query slop that would be used.

I'm not currently understanding how stop word removal is getting in  
the way though.  An example would be useful to see.

	Erik


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