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
[email protected]
http://www.mronge.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to