org.hibernate.search.util
Class AnalyzerUtils

java.lang.Object
  extended by org.hibernate.search.util.AnalyzerUtils

public class AnalyzerUtils
extends Object

Helper class to test analyzers. Taken and modified from Lucene in Action.

Author:
Hardy Ferentschik

Field Summary
static Log log
           
 
Constructor Summary
AnalyzerUtils()
           
 
Method Summary
static void displayTokens(org.apache.lucene.analysis.Analyzer analyzer, String field, String text)
           
static void displayTokensWithFullDetails(org.apache.lucene.analysis.Analyzer analyzer, String field, String text)
           
static void displayTokensWithPositions(org.apache.lucene.analysis.Analyzer analyzer, String field, String text)
           
static String getTermText(org.apache.lucene.analysis.Token token)
           
static List<String> tokenizedTermValues(org.apache.lucene.analysis.Analyzer analyzer, String field, String text)
           
static org.apache.lucene.analysis.Token[] tokensFromAnalysis(org.apache.lucene.analysis.Analyzer analyzer, String field, String text)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

public static final Log log
Constructor Detail

AnalyzerUtils

public AnalyzerUtils()
Method Detail

tokenizedTermValues

public static List<String> tokenizedTermValues(org.apache.lucene.analysis.Analyzer analyzer,
                                               String field,
                                               String text)
                                        throws IOException
Throws:
IOException

tokensFromAnalysis

public static org.apache.lucene.analysis.Token[] tokensFromAnalysis(org.apache.lucene.analysis.Analyzer analyzer,
                                                                    String field,
                                                                    String text)
                                                             throws IOException
Throws:
IOException

displayTokens

public static void displayTokens(org.apache.lucene.analysis.Analyzer analyzer,
                                 String field,
                                 String text)
                          throws IOException
Throws:
IOException

displayTokensWithPositions

public static void displayTokensWithPositions(org.apache.lucene.analysis.Analyzer analyzer,
                                              String field,
                                              String text)
                                       throws IOException
Throws:
IOException

displayTokensWithFullDetails

public static void displayTokensWithFullDetails(org.apache.lucene.analysis.Analyzer analyzer,
                                                String field,
                                                String text)
                                         throws IOException
Throws:
IOException

getTermText

public static String getTermText(org.apache.lucene.analysis.Token token)


Copyright © 2006-2012 Red Hat Middleware, LLC. All Rights Reserved