Class Analyzers


  • public class Analyzers
    extends Object
    Analyzer utilities. This class is superseeded by the open source version in solr-analyzers.
    See Also:
    TokenStream
    • Method Detail

      • analyze

        public static String analyze​(org.apache.lucene.analysis.Analyzer analyzer,
                                     String input,
                                     String separator)
                              throws IOException
        Runs an input string through the given analyzer.
        Parameters:
        analyzer - Analyzer to be used.
        input - Input to analyze.
        separator - Split the input by this separator.
        Throws:
        IOException
      • analyze

        public static List<String> analyze​(org.apache.lucene.analysis.Analyzer analyzer,
                                           String input)
                                    throws IOException
        Runs an input string through the given analyzer.
        Parameters:
        analyzer - Analyzer to be used.
        input - Input to analyze.
        Returns:
        A list of strings
        Throws:
        IOException
      • analyzeTokens

        public static List<Token> analyzeTokens​(org.apache.lucene.analysis.Analyzer analyzer,
                                                String input)
                                         throws IOException
        Runs an input string through the given analyzer and returns most available attributes extracted.
        Parameters:
        analyzer - Analyzer to be used.
        input - Input to analyze.
        Returns:
        A list of Token
        Throws:
        IOException