Java Code Examples for org.apache.lucene.analysis.CharTokenizer

The following examples show how to use org.apache.lucene.analysis.CharTokenizer. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: uyuni   Source File: KeywordAnalyzer.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Will return the exact test passed in.
 *@param fieldName ignored value
 *@param reader Reader containing data to parse
 *@return TokenStream which contains exact text passed in.
 */
@Override
public TokenStream tokenStream(String fieldName, Reader reader) {
   return new CharTokenizer(reader) {
       protected boolean isTokenChar(char c) {
           return true;
       }
   };
}
 
Example 2
Source Project: spacewalk   Source File: KeywordAnalyzer.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Will return the exact test passed in.
 *@param fieldName ignored value
 *@param reader Reader containing data to parse
 *@return TokenStream which contains exact text passed in.
 */
@Override
public TokenStream tokenStream(String fieldName, Reader reader) {
   return new CharTokenizer(reader) {
       protected boolean isTokenChar(char c) {
           return true;
       }
   };
}