Package org.apache.solr.handler
Class FieldAnalysisRequestHandler
java.lang.Object
org.apache.solr.handler.RequestHandlerBase
org.apache.solr.handler.AnalysisRequestHandlerBase
org.apache.solr.handler.FieldAnalysisRequestHandler
- All Implemented Interfaces:
AutoCloseable,ApiSupport,SolrInfoBean,NestedRequestHandler,SolrMetricProducer,SolrRequestHandler,PermissionNameProvider
Provides the ability to specify multiple field types and field names in the same request.
Expected parameters:
| Name | Type | required | Description | Multi-valued |
|---|---|---|---|---|
| analysis.fieldname | string | no | When present, the text will be analyzed based on the type of this field name. | Yes, this parameter may hold a comma-separated list of values and the analysis will be performed for each of the specified fields |
| analysis.fieldtype | string | no | When present, the text will be analyzed based on the specified type | Yes, this parameter may hold a comma-separated list of values and the analysis will be performed for each of the specified field types |
| analysis.fieldvalue | string | no | The text that will be analyzed. The analysis will mimic the index-time analysis. | No |
analysis.query OR q |
string | no | When present, the text that will be analyzed. The analysis will mimic the query-time analysis. Note that the
analysis.query parameter as precedes the q parameters. |
No |
| analysis.showmatch | boolean | no | When set to true and when query analysis is performed, the produced tokens of the field value
analysis will be marked as "matched" for every token that is produces by the query analysis |
No |
Note that if neither analysis.fieldname and analysis.fieldtype is specified, then the default search field's analyzer is used.
Note that if one of analysis.value or analysis.query or q must be specified
- Since:
- solr 1.4
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.solr.handler.AnalysisRequestHandlerBase
AnalysisRequestHandlerBase.AnalysisContext, AnalysisRequestHandlerBase.ListBasedTokenStream, AnalysisRequestHandlerBase.TokenTrackingAttribute, AnalysisRequestHandlerBase.TokenTrackingAttributeImplNested classes/interfaces inherited from class org.apache.solr.handler.RequestHandlerBase
RequestHandlerBase.HandlerMetricsNested classes/interfaces inherited from interface org.apache.solr.security.PermissionNameProvider
PermissionNameProvider.NameNested classes/interfaces inherited from interface org.apache.solr.core.SolrInfoBean
SolrInfoBean.Category, SolrInfoBean.Group -
Field Summary
Fields inherited from class org.apache.solr.handler.AnalysisRequestHandlerBase
EMPTY_BYTES_SETFields inherited from class org.apache.solr.handler.RequestHandlerBase
aggregateNodeLevelMetricsEnabled, appends, defaults, httpCaching, initArgs, invariants, metrics, publishCpuTime, REQUEST_CPU_TIMER_CONTEXT, solrMetricsContext, SOURCE_ATTRFields inherited from interface org.apache.solr.security.PermissionNameProvider
ANY, NULL, valuesFields inherited from interface org.apache.solr.metrics.SolrMetricProducer
CATEGORY_ATTR, HANDLER_ATTR, NAME_ATTR, OPERATION_ATTR, PLUGIN_NAME_ATTR, RESULT_ATTR, TYPE_ATTRFields inherited from interface org.apache.solr.request.SolrRequestHandler
TYPE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.solr.common.util.NamedListPerforms the analysis based on the given solr request and returns the analysis result as a named list.Simple one or two line descriptiongetPermissionName(AuthorizationContext request) protected org.apache.solr.common.util.NamedList<org.apache.solr.common.util.NamedList> handleAnalysisRequest(org.apache.solr.client.solrj.request.FieldAnalysisRequest request, IndexSchema schema) Handles the resolved analysis request and returns the analysis breakdown response as a named list.Methods inherited from class org.apache.solr.handler.AnalysisRequestHandlerBase
analyzeValue, getQueryTokenSet, handleRequestBodyMethods inherited from class org.apache.solr.handler.RequestHandlerBase
getApis, getCategory, getInitArgs, getMetricsForThisRequest, getName, getPluginInfo, getRequestHandler, getSolrMetricsContext, getSolrParamsFromNamedList, getSubHandler, handleRequest, init, initializeMetrics, isInternalShardRequest, processErrorMetricsOnException, processReceivedException, setPluginInfoMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.solr.api.ApiSupport
getJerseyResources, registerV1, registerV2Methods inherited from interface org.apache.solr.metrics.SolrMetricProducer
close
-
Constructor Details
-
FieldAnalysisRequestHandler
public FieldAnalysisRequestHandler()
-
-
Method Details
-
doAnalysis
Description copied from class:AnalysisRequestHandlerBasePerforms the analysis based on the given solr request and returns the analysis result as a named list.- Specified by:
doAnalysisin classAnalysisRequestHandlerBase- Parameters:
req- The solr request.- Returns:
- The analysis result as a named list.
- Throws:
Exception- When analysis fails.
-
getDescription
Description copied from interface:SolrInfoBeanSimple one or two line description- Specified by:
getDescriptionin interfaceSolrInfoBean- Specified by:
getDescriptionin classRequestHandlerBase
-
handleAnalysisRequest
protected org.apache.solr.common.util.NamedList<org.apache.solr.common.util.NamedList> handleAnalysisRequest(org.apache.solr.client.solrj.request.FieldAnalysisRequest request, IndexSchema schema) Handles the resolved analysis request and returns the analysis breakdown response as a named list.- Parameters:
request- The request to handle.schema- The index schema.- Returns:
- The analysis breakdown as a named list.
-
getPermissionName
-