On Feb 19, 2009, at 6:19 AM, Ian Vink wrote:

Once my app gets the query string from the user, is there a way to tell the query engine to only return documents where these words are at most 5 words apart? I can't tell the user to change their query, I have to do it server
side.

I would suggest using either a phrase query with a slop, or try out the SpanQueries.


Is so do I have to add anything to my index to let Lucene know about
positions of the terms when it indexes?

Nope, that information is there by default.
--
Matt Ronge
mro...@mronge.com
http://www.mronge.com


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

Reply via email to