Class SolrStream
- java.lang.Object
- 
- org.apache.solr.client.solrj.io.stream.TupleStream
- 
- org.apache.solr.client.solrj.io.stream.SolrStream
 
 
- 
- All Implemented Interfaces:
- Closeable,- Serializable,- AutoCloseable,- org.apache.solr.common.MapSerializable,- org.apache.solr.common.MapWriter,- org.apache.solr.common.NavigableObject,- org.noggit.JSONWriter.Writable
 
 public class SolrStream extends TupleStream Queries a single Solr instance and maps SolrDocs to a Stream of Tuples.- Since:
- 5.1.0
- See Also:
- Serialized Form
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classSolrStream.HandledException- 
Nested classes/interfaces inherited from class org.apache.solr.client.solrj.io.stream.TupleStreamTupleStream.IgnoreException
 
- 
 - 
Constructor SummaryConstructors Constructor Description SolrStream(String baseUrl, org.apache.solr.common.params.SolrParams params)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description List<TupleStream>children()voidclose()Closes the Stream to a single Solr InstanceStringgetBaseUrl()booleangetDistrib()StreamComparatorgetStreamSort()There is no known sort applied to a SolrStreamvoidopen()Opens the stream to a single Solr instance.Tupleread()Reads a Tuple from the stream.voidsetCheckpoint(long checkpoint)voidsetCredentials(String user, String password)voidsetDistrib(boolean distrib)voidsetFieldMappings(Map<String,String> fieldMappings)voidsetSlice(String slice)voidsetStreamContext(StreamContext context)voidsetTrace(boolean trace)Setting trace to true will include the "_CORE_" field in each Tuple emitted by the stream.ExplanationtoExplanation(StreamFactory factory)- 
Methods inherited from class org.apache.solr.client.solrj.io.stream.TupleStreamgetCost, getShards, getShards, getStreamNodeId, writeMap
 
- 
 
- 
- 
- 
Constructor Detail- 
SolrStreampublic SolrStream(String baseUrl, org.apache.solr.common.params.SolrParams params) - Parameters:
- baseUrl- Base URL of the stream.
- params- Map<String, String> of parameters
 
 
- 
 - 
Method Detail- 
childrenpublic List<TupleStream> children() - Specified by:
- childrenin class- TupleStream
 
 - 
getBaseUrlpublic String getBaseUrl() 
 - 
setStreamContextpublic void setStreamContext(StreamContext context) - Specified by:
- setStreamContextin class- TupleStream
 
 - 
openpublic void open() throws IOExceptionOpens the stream to a single Solr instance.- Specified by:
- openin class- TupleStream
- Throws:
- IOException
 
 - 
setTracepublic void setTrace(boolean trace) Setting trace to true will include the "_CORE_" field in each Tuple emitted by the stream.
 - 
setSlicepublic void setSlice(String slice) 
 - 
setCheckpointpublic void setCheckpoint(long checkpoint) 
 - 
toExplanationpublic Explanation toExplanation(StreamFactory factory) throws IOException - Specified by:
- toExplanationin class- TupleStream
- Throws:
- IOException
 
 - 
closepublic void close() throws IOExceptionCloses the Stream to a single Solr Instance- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Specified by:
- closein class- TupleStream
- Throws:
- IOException
 
 - 
readpublic Tuple read() throws IOException Reads a Tuple from the stream. The Stream is completed when Tuple.EOF == true.- Specified by:
- readin class- TupleStream
- Throws:
- IOException
 
 - 
setDistribpublic void setDistrib(boolean distrib) 
 - 
getDistribpublic boolean getDistrib() 
 - 
getStreamSortpublic StreamComparator getStreamSort() There is no known sort applied to a SolrStream- Specified by:
- getStreamSortin class- TupleStream
 
 
- 
 
-