lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Jain <>
Subject Preventing phrase queries from matching across lines
Date Fri, 28 Apr 2006 09:35:29 GMT
What is the best way to prevent a phrase query such as "eggs white" 
matching "fried eggs\nwhite snow"?

Two possibilities I have thought about:

1. Replace all line breaks with a special string, e.g. "newline".
2. Have an analyzer somehow increment the position of a term for each line 
break it encounters.

Latter seems a bit more complicated to implement, but it would also be more 
efficient, right? Or are there better options?

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message