org.apache.solr.handler
Class AnalysisRequestHandlerBase
java.lang.Object
org.apache.solr.handler.RequestHandlerBase
org.apache.solr.handler.AnalysisRequestHandlerBase
- All Implemented Interfaces:
- SolrInfoMBean, SolrRequestHandler
- Direct Known Subclasses:
- DocumentAnalysisRequestHandler, FieldAnalysisRequestHandler
public abstract class AnalysisRequestHandlerBase
- extends RequestHandlerBase
A base class for all analysis request handlers.
- Since:
- solr 1.4
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EMPTY_BYTES_SET
public static final Set<BytesRef> EMPTY_BYTES_SET
AnalysisRequestHandlerBase
public AnalysisRequestHandlerBase()
handleRequestBody
public void handleRequestBody(SolrQueryRequest req,
SolrQueryResponse rsp)
throws Exception
- Specified by:
handleRequestBody
in class RequestHandlerBase
- Throws:
Exception
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.
analyzeValue
protected NamedList<? extends Object> analyzeValue(String value,
AnalysisRequestHandlerBase.AnalysisContext context)
- Analyzes the given value using the given Analyzer.
- Parameters:
value
- Value to analyzecontext
- The analysis context
.
- Returns:
- NamedList containing the tokens produced by analyzing the given value
getQueryTokenSet
protected Set<BytesRef> getQueryTokenSet(String query,
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.
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.