You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by jb...@apache.org on 2017/06/07 01:45:49 UTC

[5/8] lucene-solr:branch_6_6: SOLR-10559: Add tuple documentation

SOLR-10559: Add tuple documentation


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/c3b192ae
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/c3b192ae
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/c3b192ae

Branch: refs/heads/branch_6_6
Commit: c3b192aed2c1b662db064dd37ffc247c01881cc6
Parents: 204447f
Author: Joel Bernstein <jb...@apache.org>
Authored: Thu Jun 1 17:08:52 2017 -0400
Committer: Joel Bernstein <jb...@apache.org>
Committed: Tue Jun 6 21:43:00 2017 -0400

----------------------------------------------------------------------
 solr/solr-ref-guide/src/stream-sources.adoc | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c3b192ae/solr/solr-ref-guide/src/stream-sources.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/stream-sources.adoc b/solr/solr-ref-guide/src/stream-sources.adoc
index 986a5da..2bb0805 100644
--- a/solr/solr-ref-guide/src/stream-sources.adoc
+++ b/solr/solr-ref-guide/src/stream-sources.adoc
@@ -480,3 +480,24 @@ topic(checkpointCollection,
       q="topic query",
       fl="id, name, country")
 ----
+
+== tuple
+
+The `tuple` function emits a single Tuple with name/value pairs. The values can be set to variables assigned in a `let` expression, literals, Stream Evaluators or
+Stream Expressions. In the case of Stream Evaluators the tuple will output the return value from the evaluator.
+This could be a numeric, list or map. If a Stream Expression is set to a value, the `tuple` function will flatten
+the tuple stream from the Stream Expression into a list of Tuples.
+
+=== tuple Parameters
+
+* name=value pairs
+
+=== tuple Syntax
+
+[source,text]
+----
+tuple(a=add(1,1),
+      b=search(collection1, q="cat:a", fl="a, b, c", sort"a desc"))
+----
+
+