public abstract class AnalysisRequestHandlerBase extends RequestHandlerBase
Modifier and Type | Class and Description |
---|---|
protected static class |
AnalysisRequestHandlerBase.AnalysisContext
Serves as the context of an analysis process.
|
protected static class |
AnalysisRequestHandlerBase.ListBasedTokenStream
TokenStream that iterates over a list of pre-existing Tokens
|
static interface |
AnalysisRequestHandlerBase.TokenTrackingAttribute
This is an
Attribute used to track the positions of tokens
in the analysis chain. |
static class |
AnalysisRequestHandlerBase.TokenTrackingAttributeImpl
Implementation of
AnalysisRequestHandlerBase.TokenTrackingAttribute . |
SolrInfoBean.Category, SolrInfoBean.Group
Modifier and Type | Field and Description |
---|---|
static Set<BytesRef> |
EMPTY_BYTES_SET |
appends, defaults, httpCaching, initArgs, invariants
TYPE
Constructor and Description |
---|
AnalysisRequestHandlerBase() |
Modifier and Type | Method and Description |
---|---|
protected NamedList<? extends Object> |
analyzeValue(String value,
AnalysisRequestHandlerBase.AnalysisContext context)
Analyzes the given value using the given Analyzer.
|
protected abstract NamedList |
doAnalysis(SolrQueryRequest req)
Performs the analysis based on the given solr request and returns the analysis result as a named list.
|
protected Set<BytesRef> |
getQueryTokenSet(String query,
Analyzer analyzer)
Analyzes the given text using the given analyzer and returns the produced tokens.
|
void |
handleRequestBody(SolrQueryRequest req,
SolrQueryResponse rsp) |
getApis, getCategory, getDescription, getInitArgs, getMetricNames, getMetricRegistry, getName, getPluginInfo, getRequestHandler, getSolrParamsFromNamedList, getSubHandler, handleRequest, init, initializeMetrics, setPluginInfo
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMetricsSnapshot, registerMetricName
registerV1, registerV2
public void handleRequestBody(SolrQueryRequest req, SolrQueryResponse rsp) throws Exception
handleRequestBody
in class RequestHandlerBase
Exception
protected abstract NamedList doAnalysis(SolrQueryRequest req) throws Exception
req
- The solr request.Exception
- When analysis fails.protected NamedList<? extends Object> analyzeValue(String value, AnalysisRequestHandlerBase.AnalysisContext context)
value
- Value to analyzecontext
- The analysis context
.Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.