Class AnalysisRequestHandlerBase

    • Field Detail

      • EMPTY_BYTES_SET

        public static final Set<org.apache.lucene.util.BytesRef> EMPTY_BYTES_SET
    • Constructor Detail

      • AnalysisRequestHandlerBase

        public AnalysisRequestHandlerBase()
    • Method Detail

      • doAnalysis

        protected abstract NamedList doAnalysis​(SolrQueryRequest req)
                                         throws Exception
        Performs the analysis based on the given solr request and returns the analysis result as a named list.
        Parameters:
        req - The solr request.
        Returns:
        The analysis result as a named list.
        Throws:
        Exception - When analysis fails.
      • getQueryTokenSet

        protected Set<org.apache.lucene.util.BytesRef> getQueryTokenSet​(String query,
                                                                        org.apache.lucene.analysis.Analyzer analyzer)
        Analyzes the given text using the given analyzer and returns the produced tokens.
        Parameters:
        query - The query to analyze.
        analyzer - The analyzer to use.