mirror of https://github.com/apache/lucene.git
SOLR-10747: Change the tuple field to return-value
This commit is contained in:
parent
81821b29ae
commit
3e70745c79
|
@ -305,7 +305,7 @@ public class StreamHandler extends RequestHandlerBase implements SolrCoreAware,
|
|||
StreamExpression streamExpression = StreamExpressionParser.parse(params.get("expr"));
|
||||
if(this.streamFactory.isEvaluator(streamExpression)) {
|
||||
StreamExpression tupleExpression = new StreamExpression("tuple");
|
||||
tupleExpression.addParameter(new StreamExpressionNamedParameter("out", streamExpression));
|
||||
tupleExpression.addParameter(new StreamExpressionNamedParameter("return-value", streamExpression));
|
||||
tupleStream = this.streamFactory.constructStream(tupleExpression);
|
||||
} else {
|
||||
tupleStream = this.streamFactory.constructStream(streamExpression);
|
||||
|
|
|
@ -5220,7 +5220,7 @@ public class StreamExpressionTest extends SolrCloudTestCase {
|
|||
solrStream.setStreamContext(context);
|
||||
List<Tuple> tuples = getTuples(solrStream);
|
||||
assertTrue(tuples.size() == 1);
|
||||
List<Number> sequence = (List<Number>)tuples.get(0).get("out");
|
||||
List<Number> sequence = (List<Number>)tuples.get(0).get("return-value");
|
||||
assertTrue(sequence.size() == 20);
|
||||
for(int i=0; i<sequence.size(); i++) {
|
||||
assertTrue(sequence.get(i).intValue() == i);
|
||||
|
|
Loading…
Reference in New Issue