public class DocumentAnalysisRequest extends SolrRequest
SolrRequest.METHOD| Modifier and Type | Field and Description |
|---|---|
private java.util.List<SolrInputDocument> |
documents |
private java.lang.String |
query |
private boolean |
showMatch |
| Constructor and Description |
|---|
DocumentAnalysisRequest()
Constructs a new request with a default uri of "/documentanalysis".
|
DocumentAnalysisRequest(java.lang.String uri)
Constructs a new request with the given request handler uri.
|
| Modifier and Type | Method and Description |
|---|---|
DocumentAnalysisRequest |
addDocument(SolrInputDocument doc)
Adds a document to be analyzed.
|
DocumentAnalysisRequest |
addDocuments(java.util.Collection<SolrInputDocument> docs)
Adds a collection of documents to be analyzed.
|
java.util.Collection<ContentStream> |
getContentStreams() |
java.util.List<SolrInputDocument> |
getDocuments()
Returns all documents that will be analyzed when processing the request.
|
ModifiableSolrParams |
getParams() |
java.lang.String |
getQuery()
Returns the query that will be analyzed when processing the request.
|
(package private) java.lang.String |
getXML()
Returns the xml be be set as the request body.
|
boolean |
isShowMatch()
Returns whether index time tokens that match query time tokens will be marked as a "match".
|
DocumentAnalysisResponse |
process(SolrServer server) |
DocumentAnalysisRequest |
setQuery(java.lang.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".
|
getMethod, getPath, getResponseParser, setMethod, setPath, setResponseParserprivate java.util.List<SolrInputDocument> documents
private java.lang.String query
private boolean showMatch
public DocumentAnalysisRequest()
public DocumentAnalysisRequest(java.lang.String uri)
uri - The of the request handler.public java.util.Collection<ContentStream> getContentStreams() throws java.io.IOException
getContentStreams in class SolrRequestjava.io.IOExceptionpublic ModifiableSolrParams getParams()
getParams in class SolrRequestpublic DocumentAnalysisResponse process(SolrServer server) throws SolrServerException, java.io.IOException
process in class SolrRequestSolrServerExceptionjava.io.IOExceptionjava.lang.String getXML()
throws java.io.IOException
java.io.IOException - When constructing the xml failspublic DocumentAnalysisRequest addDocument(SolrInputDocument doc)
doc - The document to be analyzed.public DocumentAnalysisRequest addDocuments(java.util.Collection<SolrInputDocument> docs)
docs - The documents to be analyzed.addDocument(org.apache.solr.common.SolrInputDocument)public DocumentAnalysisRequest setQuery(java.lang.String query)
query - The query to be analyzed.public DocumentAnalysisRequest setShowMatch(boolean showMatch)
false. Obviously, this flag is ignored if when the query is set to null.showMatch - Sets whether index time tokens that match query time tokens should be marked as a "match".public java.util.List<SolrInputDocument> getDocuments()
addDocument(org.apache.solr.common.SolrInputDocument)public java.lang.String getQuery()
null indicating that no
query time analysis is taking place.setQuery(String)public boolean isShowMatch()
setShowMatch(boolean)