lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Jain <>
Subject NullAnalyzer
Date Fri, 11 Jun 2004 08:24:00 GMT
There doesn't seem to be an Analyzer that doesn't do anything included 
with Lucene, is there? This would seem useful to prevent tokenization of 
certain fields in queries, together with the PerFieldAnalyzerWrapper. 
But perhaps there is a better way to accomplish this?

   private static class NullAnalyzer
     extends Analyzer
     public TokenStream tokenStream(String fieldName, Reader reader)
       return new CharTokenizer(reader)
         protected boolean isTokenChar(char c)
           return true;

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message