FieldAnalysisRequestHandler (Solr 3.6.2 API)
Keywords: org.apache.solr.handler.FieldAnalysisRequestHandler class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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:
  SolrInfoMBean, SolrRequestHandler

    public class FieldAnalysisRequestHandler

extends AnalysisRequestHandlerBase

RequestHandler that provides much the same functionality as analysis.jsp. 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 | yes | 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.

Since:
  solr 1.4
Version:
  $Id: FieldAnalysisRequestHandler.java 1065312 2011-01-30 16:08:25Z rmuir $

Nested Class Summary

Nested classes/interfaces inherited from class org.apache.solr.handler.AnalysisRequestHandlerBase
`AnalysisRequestHandlerBase.AnalysisContext, AnalysisRequestHandlerBase.ListBasedTokenStream, AnalysisRequestHandlerBase.TokenTrackingAttribute, AnalysisRequestHandlerBase.TokenTrackingAttributeImpl`

Nested classes/interfaces inherited from interface org.apache.solr.core.SolrInfoMBean
`SolrInfoMBean.Category`

Field Summary

Fields inherited from class org.apache.solr.handler.RequestHandlerBase
`appends, defaults, httpCaching, initArgs, invariants`

Constructor Summary
`FieldAnalysisRequestHandler()`

Method Summary
`protected NamedList` | `doAnalysis(SolrQueryRequest req)` Performs the analysis based on the given solr request and returns the analysis result as a named list.
`String` | `getDescription()` Simple one or two line description
`String` | `getSource()` CVS Source, SVN Source, etc
`String` | `getSourceId()` CVS Id, SVN Id, etc
`String` | `getVersion()` Simple common usage version, e.g.
`protected NamedList<NamedList>` | `handleAnalysisRequest(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, analyzeValue, getQueryTokenSet, handleRequestBody`

Methods inherited from class org.apache.solr.handler.RequestHandlerBase
`getCategory, getDocs, getInitArgs, getName, getStatistics, handleRequest, init`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### FieldAnalysisRequestHandler

    public FieldAnalysisRequestHandler()

Method Detail

### doAnalysis

    protected NamedList doAnalysis(SolrQueryRequest req)
                            throws Exception

  Performs the analysis based on the given solr request and returns the analysis result as a named list.

  Specified by:
    `doAnalysis` in class `AnalysisRequestHandlerBase`
  Parameters:
    `req` - The solr request.
  Returns:
    The analysis result as a named list.
  Throws:
    `Exception` - When analysis fails.

### getDescription

    public String getDescription()

  Description copied from interface: `SolrInfoMBean`
  Simple one or two line description

  Specified by:
    `getDescription` in interface `SolrInfoMBean`
  Specified by:
    `getDescription` in class `RequestHandlerBase`

### getVersion

    public String getVersion()

  Description copied from interface: `SolrInfoMBean`
  Simple common usage version, e.g. 2.0

  Specified by:
    `getVersion` in interface `SolrInfoMBean`
  Specified by:
    `getVersion` in class `RequestHandlerBase`

### getSourceId

    public String getSourceId()

  Description copied from interface: `SolrInfoMBean`
  CVS Id, SVN Id, etc

  Specified by:
    `getSourceId` in interface `SolrInfoMBean`
  Specified by:
    `getSourceId` in class `RequestHandlerBase`

### getSource

    public String getSource()

  Description copied from interface: `SolrInfoMBean`
  CVS Source, SVN Source, etc

  Specified by:
    `getSource` in interface `SolrInfoMBean`
  Specified by:
    `getSource` in class `RequestHandlerBase`

### handleAnalysisRequest

    protected NamedList<NamedList> handleAnalysisRequest(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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD