Class DocumentAnalysisRequest
java.lang.Object
org.apache.solr.client.solrj.SolrRequest<DocumentAnalysisResponse>
org.apache.solr.client.solrj.request.CollectionRequiringSolrRequest<DocumentAnalysisResponse>
org.apache.solr.client.solrj.request.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:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.solr.client.solrj.SolrRequest
SolrRequest.ApiVersion, SolrRequest.METHOD, SolrRequest.SolrClientContext, SolrRequest.SolrRequestType -
Field Summary
Fields inherited from class org.apache.solr.client.solrj.SolrRequest
SUPPORTED_METHODS -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new request with a default uri of "/documentanalysis".Constructs a new request with the given request handler uri. -
Method Summary
Modifier and TypeMethodDescriptionAdds a document to be analyzed.Adds a collection of documents to be analyzed.protected DocumentAnalysisResponsecreateResponse(NamedList<Object> namedList) Create a new SolrResponse to hold the response from the server.getContentWriter(String expectedType) If a request object wants to do a push write, implement this method.Returns all documents that will be analyzed when processing the request.The parameters for this request; never null.getQuery()Returns the query that will be analyzed when processing the request.booleanReturns whether index time tokens that match query time tokens will be marked as a "match".Sets the query to be analyzed.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.request.CollectionRequiringSolrRequest
requiresCollectionMethods inherited from class org.apache.solr.client.solrj.SolrRequest
addHeader, addHeaders, getApiVersion, getBasicAuthPassword, getBasicAuthUser, getCollection, getContentStreams, getHeaders, getMethod, getPath, getPreferredNodes, getQueryParams, getRequestType, getResponseParser, getStreamingResponseCallback, getUserPrincipal, process, process, processWithBaseUrl, setBasicAuthCredentials, setMethod, setPath, setPreferredNodes, setQueryParams, setRequestType, setResponseParser, setStreamingResponseCallback, setUserPrincipal
-
Constructor Details
-
DocumentAnalysisRequest
public DocumentAnalysisRequest()Constructs a new request with a default uri of "/documentanalysis". -
DocumentAnalysisRequest
Constructs a new request with the given request handler uri.- Parameters:
uri- The of the request handler.
-
-
Method Details
-
getContentWriter
Description copied from class:SolrRequestIf a request object wants to do a push write, implement this method.- Overrides:
getContentWriterin classSolrRequest<DocumentAnalysisResponse>- Parameters:
expectedType- This is the type that the RequestWriter would like to get. But, it is OK to send any format
-
createResponse
Description copied from class:SolrRequestCreate a new SolrResponse to hold the response from the server. If the response extendsSolrResponse, then there's no need to use the arguments, asSolrResponse.setResponse(NamedList)will be called right after this method.- Specified by:
createResponsein classSolrRequest<DocumentAnalysisResponse>- Parameters:
namedList- fromSolrClient.request(SolrRequest, String).
-
getParams
Description copied from class:SolrRequestThe parameters for this request; never null. The runtime type may be mutable but modifications may not affect thisSolrRequestinstance, as it may return a new instance here every time. If the subclass specifies the response type asModifiableSolrParams, 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:
getParamsin classSolrRequest<DocumentAnalysisResponse>
-
addDocument
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
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
Sets whether index time tokens that match query time tokens should be marked as a "match". By default, this is set tofalse. Obviously, this flag is ignored if when the query is set tonull.- 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
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
Returns the query that will be analyzed when processing the request. May returnnullindicating 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:
-