Class DocumentAnalysisRequest

All Implemented Interfaces:
Serializable

public class DocumentAnalysisRequest extends CollectionRequiringSolrRequest<DocumentAnalysisResponse>
A request for the org.apache.solr.handler.DocumentAnalysisRequestHandler.
Since:
solr 1.4
See Also:
  • Constructor Details

    • 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 Details

    • getContentWriter

      public RequestWriter.ContentWriter getContentWriter(String expectedType)
      Description copied from class: SolrRequest
      If a request object wants to do a push write, implement this method.
      Overrides:
      getContentWriter in class SolrRequest<DocumentAnalysisResponse>
      Parameters:
      expectedType - This is the type that the RequestWriter would like to get. But, it is OK to send any format
    • createResponse

      protected DocumentAnalysisResponse createResponse(NamedList<Object> namedList)
      Description copied from class: SolrRequest
      Create a new SolrResponse to hold the response from the server. If the response extends SolrResponse, then there's no need to use the arguments, as SolrResponse.setResponse(NamedList) will be called right after this method.
      Specified by:
      createResponse in class SolrRequest<DocumentAnalysisResponse>
      Parameters:
      namedList - from SolrClient.request(SolrRequest, String).
    • getParams

      public SolrParams getParams()
      Description copied from class: SolrRequest
      The parameters for this request; never null. The runtime type may be mutable but modifications may not affect this SolrRequest instance, as it may return a new instance here every time. If the subclass specifies the response type as ModifiableSolrParams, then one can expect it to change this request. If the subclass has a setter then one can expect this method to return the value set.
      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

      Adds a collection of documents to be analyzed.
      Parameters:
      docs - The documents to be analyzed.
      Returns:
      This DocumentAnalysisRequest (fluent interface support).
      See Also:
    • 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:
    • 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:
    • 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: