Class DeleteStream
- java.lang.Object
-
- org.apache.solr.client.solrj.io.stream.TupleStream
-
- org.apache.solr.client.solrj.io.stream.UpdateStream
-
- org.apache.solr.client.solrj.io.stream.DeleteStream
-
- All Implemented Interfaces:
Closeable,Serializable,AutoCloseable,Expressible,org.apache.solr.common.MapSerializable,org.apache.solr.common.MapWriter,org.apache.solr.common.NavigableObject,org.noggit.JSONWriter.Writable
public final class DeleteStream extends UpdateStream implements Expressible
Uses tuples to identify the uniqueKey values of documents to be deleted- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.solr.client.solrj.io.stream.TupleStream
TupleStream.IgnoreException
-
-
Field Summary
-
Fields inherited from class org.apache.solr.client.solrj.io.stream.UpdateStream
BATCH_INDEXED_FIELD_NAME, clientCache, zkHost
-
-
Constructor Summary
Constructors Constructor Description DeleteStream(StreamExpression expression, StreamFactory factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleandefaultPruneVersionField()DeleteStreamreturnsfalseso that Optimistic Concurrency Constraints are respected by default when using this stream to wrap aSearchStreamquery.ExplanationtoExplanation(StreamFactory factory)Returns an explanation about the stream objectprotected voiduploadBatchToCollection(List<org.apache.solr.common.SolrInputDocument> documentBatch)Overrides implementation to extract the"id"and"_version_"(if included) from each document and use that information to construct a "Delete By Id" request.-
Methods inherited from class org.apache.solr.client.solrj.io.stream.UpdateStream
children, close, getCollectionName, getStreamSort, open, read, setStreamContext, toExpression
-
Methods inherited from class org.apache.solr.client.solrj.io.stream.TupleStream
getCost, getShards, getShards, getStreamNodeId, writeMap
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.solr.client.solrj.io.stream.expr.Expressible
toExpression
-
-
-
-
Constructor Detail
-
DeleteStream
public DeleteStream(StreamExpression expression, StreamFactory factory) throws IOException
- Throws:
IOException
-
-
Method Detail
-
toExplanation
public Explanation toExplanation(StreamFactory factory) throws IOException
Description copied from interface:ExpressibleReturns an explanation about the stream object- Specified by:
toExplanationin interfaceExpressible- Overrides:
toExplanationin classUpdateStream- Parameters:
factory- Stream factory for this, contains information about the function name- Returns:
- Explanation about this stream object containing explanations of any child stream objects
- Throws:
IOException- throw on any error
-
defaultPruneVersionField
protected boolean defaultPruneVersionField()
DeleteStreamreturnsfalseso that Optimistic Concurrency Constraints are respected by default when using this stream to wrap aSearchStreamquery.- Overrides:
defaultPruneVersionFieldin classUpdateStream
-
uploadBatchToCollection
protected void uploadBatchToCollection(List<org.apache.solr.common.SolrInputDocument> documentBatch) throws IOException
Overrides implementation to extract the"id"and"_version_"(if included) from each document and use that information to construct a "Delete By Id" request. Any other fields (ie: Tuple values) are ignored.- Overrides:
uploadBatchToCollectionin classUpdateStream- Throws:
IOException
-
-