lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grant Ingersoll <gsing...@apache.org>
Subject Re: "Near" force in query server side?
Date Thu, 19 Feb 2009 12:28:34 GMT
You will likely need to create n-grams from the user query and from  
that construct a sloppy PhraseQuery.

There is an n-gram Filter in the contrib/analysis package (I think it  
is called the ShingleFilter)


On Feb 19, 2009, at 7: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.
> Is so do I have to add anything to my index to let Lucene know about
> positions of the terms when it indexes?
>
> Thanks,
> Ian Vink
> http://BahaiResearch.com

--------------------------
Grant Ingersoll
http://www.lucidimagination.com/

Search the Lucene ecosystem (Lucene/Solr/Nutch/Mahout/Tika/Droids)  
using Solr/Lucene:
http://www.lucidimagination.com/search


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


Mime
View raw message