lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: Using analyzers with term queries
Date Tue, 25 Oct 2005 12:02:23 GMT

On 25 Oct 2005, at 07:00, Rob Young wrote:
> I am using TermQuery s (and FuzzyQuery s) on the searching side and  
> I would like to keep doing so. However, I would like to use the  
> MetaphoneReplacementAnalyzer (from Lucene in Action) when indexing.  
> How can I allow for this in searching if I'm using TermQuery?

You could simply call the metaphone .encode method on the text before  
constructing a Term for TermQuery.  Or, alternatively, you could run  
the Analyzer on the String (using a StringReader) and capture the  
token(s) that come back to formulate the TermQuery(s).

     Erik


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