lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Philip Brown <...@us.ibm.com>
Subject Re: Phrase search using quotes -- special Tokenizer
Date Fri, 01 Sep 2006 18:21:53 GMT

Thanks, but I don't "think" I need that.  But curious, how will it know it's
a phrase if it's not enclosed in quotes?  Won't all its terms be treated
separately then?

Philip


Mark Miller-5 wrote:
> 
> One more tip...if you would like to be able to search phrases without 
> putting in the quotes you must strip them with the analyzer. In 
> standardfilter (in the standard analyzer code) add this:
> 
>  private static final String QUOTED_TYPE = tokenImage[QUOTED];
> - youll see where to put that
> 
> and youll see where to put this:
> 
> else if (type == QUOTED_TYPE)  {
>      return new 
> org.apache.lucene.analysis.Token(text.STRIPMYQUOTESOFFBABY(),t.startOffset(), 
> t.endOffset(), type);
> }
> 
> text is a string so don't take my pseudo code literally.
> 
> - Mark
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Phrase-search-using-quotes----special-Tokenizer-tf2200760.html#a6103859
Sent from the Lucene - Java Users forum at Nabble.com.


---------------------------------------------------------------------
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