You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Vishal Bathija <vi...@gmail.com> on 2006/07/07 06:30:33 UTC

use of wildcards in a phrase

Hello,
I would like to know how to search for phrases that have wild cards in
them. For eg. I want to search for the phrase "Reduces Project Sucess
Risk". I want to add wildcard * to each of these terms, so that I can
search of phrases such as "Reduces Project Sucess Risks"  Is this
possible?

Regards
Vishal Bathija

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


Re: use of wildcards in a phrase

Posted by Chris Hostetter <ho...@fucit.org>.
: I would like to know how to search for phrases that have wild cards in
: them. For eg. I want to search for the phrase "Reduces Project Sucess
: Risk". I want to add wildcard * to each of these terms, so that I can
: search of phrases such as "Reduces Project Sucess Risks"  Is this

more then likely what you want is not to use wildcards in phrase queries.
what you most likely want is called stemming ... if you google for that
word you'll find a lot of good info and if you look in Lucene In Action
you'll find examples of stemming in lucene.  Stemming is what makes all of
these phrases equivilent...

   Reduces Project Sucess Risks
   Reduce  Project Sucess Risk
   Reduces Product Sucess Risk
   Reduce  Product Sucess Risks

You can in fact make a Phrase query containing wildcards (MultiPhraseQuery
is the class to look at) but that would make your example match things
like "Reduces Projectionistic Sucession Riskerinorunee" .. probably not
what you want.


-Hoss


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