You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Ravi <ra...@htinc.com> on 2004/10/27 21:36:14 UTC
Stopwords in Exact phrase
Is there way to include stopwords in an exact phrase search? For
example, when I search on "Melbourne IT", Lucene only searches for
Melbourne ignoring "IT".
Thanks,
Ravi.
---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org
Re: Stopwords in Exact phrase
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Oct 27, 2004, at 3:36 PM, Ravi wrote:
> Is there way to include stopwords in an exact phrase search? For
> example, when I search on "Melbourne IT", Lucene only searches for
> Melbourne ignoring "IT".
But you want stop words removed for general term queries?
Have a look at how Nutch does its thing - it has a very similar type of
situation where it deals with common terms differently if they are in a
phrase.
There are other choices - use a different analyzer, and if you want
that used only for phrase queries you can override QueryParser and its
getFieldQuery method.
Erik
---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org
Re: Stopwords in Exact phrase
Posted by Justin Swanhart <gr...@gmail.com>.
your analyzer will have removed the stopword when you indexed your documents, so
lucene won't be able to do this for you.
You will need to implement a second pass over the results returned by lucene and
check to see if the stopword is included, perhaps with String.indexOf()
On Wed, 27 Oct 2004 14:36:14 -0500, Ravi <ra...@htinc.com> wrote:
> Is there way to include stopwords in an exact phrase search? For
> example, when I search on "Melbourne IT", Lucene only searches for
> Melbourne ignoring "IT".
>
> Thanks,
> Ravi.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org