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
Queries a single Solr instance and maps SolrDocs to a Stream of Tuples.
- Since:
- 5.1.0
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.apache.solr.client.solrj.io.stream.TupleStream
TupleStream.IgnoreExceptionNested classes/interfaces inherited from interface org.apache.solr.common.MapWriter
org.apache.solr.common.MapWriter.EntryWriter -
Field Summary
Fields inherited from interface org.apache.solr.common.MapWriter
EMPTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionchildren()voidclose()Closes the Stream to a single Solr InstancebooleanThere is no known sort applied to a SolrStreamvoidopen()Opens the stream to a single Solr instance.read()Reads a Tuple from the stream.voidsetCheckpoint(long checkpoint) voidsetCredentials(String user, String password) voidsetDistrib(boolean distrib) voidsetFieldMappings(Map<String, String> fieldMappings) voidvoidsetStreamContext(StreamContext context) voidsetTrace(boolean trace) Setting trace to true will include the "_CORE_" field in each Tuple emitted by the stream.toExplanation(StreamFactory factory) Methods inherited from class org.apache.solr.client.solrj.io.stream.TupleStream
getCost, getShards, getShards, getStreamNodeId, writeMapMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.solr.common.MapWriter
jsonStr, toMap, writeMethods inherited from interface org.apache.solr.common.NavigableObject
_forEachEntry, _forEachEntry, _forEachEntry, _get, _get, _getStr, _getStr, _size
-
Constructor Details
-
SolrStream
- Parameters:
baseUrl- Base URL of the stream.params- Map<String, String> of parameters
-
-
Method Details
-
setFieldMappings
-
children
- Specified by:
childrenin classTupleStream
-
getBaseUrl
-
setStreamContext
- Specified by:
setStreamContextin classTupleStream
-
setCredentials
-
open
Opens the stream to a single Solr instance.- Specified by:
openin classTupleStream- Throws:
IOException
-
setTrace
public void setTrace(boolean trace) Setting trace to true will include the "_CORE_" field in each Tuple emitted by the stream. -
setSlice
-
setCheckpoint
public void setCheckpoint(long checkpoint) -
toExplanation
- Specified by:
toExplanationin classTupleStream- Throws:
IOException
-
close
Closes the Stream to a single Solr Instance- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classTupleStream- Throws:
IOException
-
read
Reads a Tuple from the stream. The Stream is completed when Tuple.EOF == true.- Specified by:
readin classTupleStream- Throws:
IOException
-
setDistrib
public void setDistrib(boolean distrib) -
getDistrib
public boolean getDistrib() -
getStreamSort
There is no known sort applied to a SolrStream- Specified by:
getStreamSortin classTupleStream
-