Package org.apache.solr.handler
Class ClassifyStream
- java.lang.Object
-
- org.apache.solr.client.solrj.io.stream.TupleStream
-
- org.apache.solr.handler.ClassifyStream
-
- All Implemented Interfaces:
Closeable
,Serializable
,AutoCloseable
,org.apache.solr.client.solrj.io.stream.expr.Expressible
,org.apache.solr.common.MapSerializable
,org.apache.solr.common.MapWriter
,org.apache.solr.common.NavigableObject
public class ClassifyStream extends org.apache.solr.client.solrj.io.stream.TupleStream implements org.apache.solr.client.solrj.io.stream.expr.Expressible
The classify expression retrieves a model trained by the train expression and uses it to classify documents from a stream Syntax: classif(model(...), anyStream(...), field="body")- Since:
- 6.3.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ClassifyStream(org.apache.solr.client.solrj.io.stream.expr.StreamExpression expression, org.apache.solr.client.solrj.io.stream.expr.StreamFactory factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<org.apache.solr.client.solrj.io.stream.TupleStream>
children()
void
close()
org.apache.solr.client.solrj.io.comp.StreamComparator
getStreamSort()
void
open()
org.apache.solr.client.solrj.io.Tuple
read()
void
setStreamContext(org.apache.solr.client.solrj.io.stream.StreamContext context)
org.apache.solr.client.solrj.io.stream.expr.Explanation
toExplanation(org.apache.solr.client.solrj.io.stream.expr.StreamFactory factory)
org.apache.solr.client.solrj.io.stream.expr.StreamExpressionParameter
toExpression(org.apache.solr.client.solrj.io.stream.expr.StreamFactory factory)
-
Methods inherited from class org.apache.solr.client.solrj.io.stream.TupleStream
getCost, getShards, getShards, getStreamNodeId, writeMap
-
-
-
-
Constructor Detail
-
ClassifyStream
public ClassifyStream(org.apache.solr.client.solrj.io.stream.expr.StreamExpression expression, org.apache.solr.client.solrj.io.stream.expr.StreamFactory factory) throws IOException
- Throws:
IOException
-
-
Method Detail
-
setStreamContext
public void setStreamContext(org.apache.solr.client.solrj.io.stream.StreamContext context)
- Specified by:
setStreamContext
in classorg.apache.solr.client.solrj.io.stream.TupleStream
-
children
public List<org.apache.solr.client.solrj.io.stream.TupleStream> children()
- Specified by:
children
in classorg.apache.solr.client.solrj.io.stream.TupleStream
-
open
public void open() throws IOException
- Specified by:
open
in classorg.apache.solr.client.solrj.io.stream.TupleStream
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classorg.apache.solr.client.solrj.io.stream.TupleStream
- Throws:
IOException
-
read
public org.apache.solr.client.solrj.io.Tuple read() throws IOException
- Specified by:
read
in classorg.apache.solr.client.solrj.io.stream.TupleStream
- Throws:
IOException
-
getStreamSort
public org.apache.solr.client.solrj.io.comp.StreamComparator getStreamSort()
- Specified by:
getStreamSort
in classorg.apache.solr.client.solrj.io.stream.TupleStream
-
toExpression
public org.apache.solr.client.solrj.io.stream.expr.StreamExpressionParameter toExpression(org.apache.solr.client.solrj.io.stream.expr.StreamFactory factory) throws IOException
- Specified by:
toExpression
in interfaceorg.apache.solr.client.solrj.io.stream.expr.Expressible
- Throws:
IOException
-
toExplanation
public org.apache.solr.client.solrj.io.stream.expr.Explanation toExplanation(org.apache.solr.client.solrj.io.stream.expr.StreamFactory factory) throws IOException
- Specified by:
toExplanation
in interfaceorg.apache.solr.client.solrj.io.stream.expr.Expressible
- Specified by:
toExplanation
in classorg.apache.solr.client.solrj.io.stream.TupleStream
- Throws:
IOException
-
-