Class ContentStreamUpdateRequest
- java.lang.Object
-
- org.apache.solr.client.solrj.SolrRequest<UpdateResponse>
-
- org.apache.solr.client.solrj.request.AbstractUpdateRequest
-
- org.apache.solr.client.solrj.request.ContentStreamUpdateRequest
-
- All Implemented Interfaces:
Serializable
,IsUpdateRequest
public class ContentStreamUpdateRequest extends AbstractUpdateRequest
Basic functionality to upload a File orContentStream
to a Solr Cell or some other handler that takes ContentStreams (CSV)See https://solr.apache.org/guide/indexing-with-tika.html
See https://solr.apache.org/guide/indexing-with-update-handlers.html- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.solr.client.solrj.request.AbstractUpdateRequest
AbstractUpdateRequest.ACTION
-
Nested classes/interfaces inherited from class org.apache.solr.client.solrj.SolrRequest
SolrRequest.METHOD, SolrRequest.SolrClientContext, SolrRequest.SolrRequestType
-
-
Field Summary
-
Fields inherited from class org.apache.solr.client.solrj.request.AbstractUpdateRequest
commitWithin, params
-
Fields inherited from class org.apache.solr.client.solrj.SolrRequest
SUPPORTED_METHODS, useBinaryV2, usev2
-
-
Constructor Summary
Constructors Constructor Description ContentStreamUpdateRequest(String url)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addContentStream(ContentStream contentStream)
Add aContentStream
togetContentStreams()
void
addFile(File file, String contentType)
Add a File to theContentStream
s.Collection<ContentStream>
getContentStreams()
RequestWriter.ContentWriter
getContentWriter(String expectedType)
If a request object wants to do a push write, implement this method.-
Methods inherited from class org.apache.solr.client.solrj.request.AbstractUpdateRequest
createResponse, getAction, getCommitWithin, getParams, getRequestType, isWaitSearcher, rollback, setAction, setAction, setAction, setAction, setAction, setAction, setAction, setCommitWithin, setParam, setParams, setWaitSearcher
-
Methods inherited from class org.apache.solr.client.solrj.SolrRequest
addHeader, getBasePath, getBasicAuthPassword, getBasicAuthUser, getCollection, getHeaders, getMethod, getPath, getQueryParams, getResponseParser, getStreamingResponseCallback, getUserPrincipal, process, process, setBasePath, setBasicAuthCredentials, setMethod, setPath, setQueryParams, setResponseParser, setStreamingResponseCallback, setUseBinaryV2, setUserPrincipal, setUseV2
-
-
-
-
Constructor Detail
-
ContentStreamUpdateRequest
public ContentStreamUpdateRequest(String url)
- Parameters:
url
- The URL to send theContentStream
to in Solr.
-
-
Method Detail
-
getContentStreams
public Collection<ContentStream> getContentStreams() throws IOException
- Overrides:
getContentStreams
in classSolrRequest<UpdateResponse>
- Throws:
IOException
-
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 classSolrRequest<UpdateResponse>
- Parameters:
expectedType
- This is the type that the RequestWriter would like to get. But, it is OK to send any format
-
addFile
public void addFile(File file, String contentType) throws IOException
Add a File to theContentStream
s.- Parameters:
file
- The File to add.- Throws:
IOException
- if there was an error with the file.- See Also:
getContentStreams()
,ContentStreamBase.FileStream
-
addContentStream
public void addContentStream(ContentStream contentStream)
Add aContentStream
togetContentStreams()
- Parameters:
contentStream
- TheContentStream
-
-