You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by cp...@apache.org on 2017/06/02 10:56:55 UTC

[32/38] lucene-solr:jira/solr-8668: 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/057451ac
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/057451ac
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/057451ac

Branch: refs/heads/jira/solr-8668
Commit: 057451ac643b134dda3f685c5ffec1b2cdc23dc0
Parents: 6d6e47f
Author: Joel Bernstein <jb...@apache.org>
Authored: Thu Jun 1 17:08:52 2017 -0400
Committer: Joel Bernstein <jb...@apache.org>
Committed: Thu Jun 1 17:08:52 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/057451ac/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"))
+----
+
+