org.apache.solr.client.solrj.request

## Class DocumentAnalysisRequest

- java.lang.Object
- - org.apache.solr.client.solrj.SolrRequest<DocumentAnalysisResponse>
  - - org.apache.solr.client.solrj.request.DocumentAnalysisRequest

- All Implemented Interfaces:
    Serializable

      public class DocumentAnalysisRequest
      extends SolrRequest<DocumentAnalysisResponse>

  A request for the org.apache.solr.handler.DocumentAnalysisRequestHandler.
  Since:
    solr 1.4
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.solr.client.solrj.SolrRequest

      `SolrRequest.METHOD`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DocumentAnalysisRequest()` Constructs a new request with a default uri of "/documentanalysis".
    `DocumentAnalysisRequest(String uri)` Constructs a new request with the given request handler uri.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `DocumentAnalysisRequest` | `addDocument(SolrInputDocument doc)` Adds a document to be analyzed.
    `DocumentAnalysisRequest` | `addDocuments(Collection<SolrInputDocument> docs)` Adds a collection of documents to be analyzed.
    `protected DocumentAnalysisResponse` | `createResponse(SolrClient client)` Create a new SolrResponse to hold the response from the server
    `Collection<ContentStream>` | `getContentStreams()`
    `List<SolrInputDocument>` | `getDocuments()` Returns all documents that will be analyzed when processing the request.
    `ModifiableSolrParams` | `getParams()`
    `String` | `getQuery()` Returns the query that will be analyzed when processing the request.
    `boolean` | `isShowMatch()` Returns whether index time tokens that match query time tokens will be marked as a "match".
    `DocumentAnalysisRequest` | `setQuery(String query)` Sets the query to be analyzed.
    `DocumentAnalysisRequest` | `setShowMatch(boolean showMatch)` Sets whether index time tokens that match query time tokens should be marked as a "match".

    - ### Methods inherited from class org.apache.solr.client.solrj.SolrRequest

      `getBasicAuthPassword, getBasicAuthUser, getMethod, getPath, getQueryParams, getResponseParser, getStreamingResponseCallback, process, process, setBasicAuthCredentials, setMethod, setPath, setQueryParams, setResponseParser, setStreamingResponseCallback`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DocumentAnalysisRequest

          public DocumentAnalysisRequest()

      Constructs a new request with a default uri of "/documentanalysis".

    - #### DocumentAnalysisRequest

          public DocumentAnalysisRequest(String uri)

      Constructs a new request with the given request handler uri.
      Parameters:
        `uri` - The of the request handler.

  - ### Method Detail

    - #### getContentStreams

          public Collection<ContentStream> getContentStreams()
                                                      throws IOException

      Specified by:
        `getContentStreams` in class `SolrRequest<DocumentAnalysisResponse>`
      Throws:
        `IOException`

    - #### createResponse

          protected DocumentAnalysisResponse createResponse(SolrClient client)

      Description copied from class: `SolrRequest`
      Create a new SolrResponse to hold the response from the server
      Specified by:
        `createResponse` in class `SolrRequest<DocumentAnalysisResponse>`
      Parameters:
        `client` - the `SolrClient` the request will be sent to

    - #### getParams

          public ModifiableSolrParams getParams()

      Specified by:
        `getParams` in class `SolrRequest<DocumentAnalysisResponse>`

    - #### addDocument

          public DocumentAnalysisRequest addDocument(SolrInputDocument doc)

      Adds a document to be analyzed.
      Parameters:
        `doc` - The document to be analyzed.
      Returns:
        This DocumentAnalysisRequest (fluent interface support).

    - #### addDocuments

          public DocumentAnalysisRequest addDocuments(Collection<SolrInputDocument> docs)

      Adds a collection of documents to be analyzed.
      Parameters:
        `docs` - The documents to be analyzed.
      Returns:
        This DocumentAnalysisRequest (fluent interface support).
      See Also:
        `addDocument(org.apache.solr.common.SolrInputDocument)`

    - #### setQuery

          public DocumentAnalysisRequest setQuery(String query)

      Sets the query to be analyzed. By default the query is set to null, meaning no query analysis will be performed.
      Parameters:
        `query` - The query to be analyzed.
      Returns:
        This DocumentAnalysisRequest (fluent interface support).

    - #### setShowMatch

          public DocumentAnalysisRequest setShowMatch(boolean showMatch)

      Sets whether index time tokens that match query time tokens should be marked as a "match". By default this is set to `false`. Obviously, this flag is ignored if when the query is set to `null`.
      Parameters:
        `showMatch` - Sets whether index time tokens that match query time tokens should be marked as a "match".
      Returns:
        This DocumentAnalysisRequest (fluent interface support).

    - #### getDocuments

          public List<SolrInputDocument> getDocuments()

      Returns all documents that will be analyzed when processing the request.
      Returns:
        All documents that will be analyzed when processing the request.
      See Also:
        `addDocument(org.apache.solr.common.SolrInputDocument)`

    - #### getQuery

          public String getQuery()

      Returns the query that will be analyzed when processing the request. May return `null` indicating that no query time analysis is taking place.
      Returns:
        The query that will be analyzed when processing the request.
      See Also:
        `setQuery(String)`

    - #### isShowMatch

          public boolean isShowMatch()

      Returns whether index time tokens that match query time tokens will be marked as a "match".
      Returns:
        Whether index time tokens that match query time tokens will be marked as a "match".
      See Also:
        `setShowMatch(boolean)`

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.