lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Ronge <>
Subject Re: "Near" force in query server side?
Date Sun, 22 Feb 2009 06:03:35 GMT

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

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

View raw message