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:52 UTC

[8/8] lucene-solr:branch_6_6: SOLR-10516: Add documention

SOLR-10516: Add documention


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

Branch: refs/heads/branch_6_6
Commit: da03b1e90fd71ebde9770f92fadc6f15b123b3a3
Parents: 90b3879
Author: Joel Bernstein <jb...@apache.org>
Authored: Tue Jun 6 13:07:42 2017 -0400
Committer: Joel Bernstein <jb...@apache.org>
Committed: Tue Jun 6 21:44:59 2017 -0400

----------------------------------------------------------------------
 solr/solr-ref-guide/src/stream-decorators.adoc | 23 ++++++++++++++++++---
 solr/solr-ref-guide/src/stream-sources.adoc    |  5 ++++-
 2 files changed, 24 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/da03b1e9/solr/solr-ref-guide/src/stream-decorators.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/stream-decorators.adoc b/solr/solr-ref-guide/src/stream-decorators.adoc
index cbbc9ef..1594833 100644
--- a/solr/solr-ref-guide/src/stream-decorators.adoc
+++ b/solr/solr-ref-guide/src/stream-decorators.adoc
@@ -23,8 +23,6 @@
 == cartesianProduct
 //TODO
 
-== cell
-//TODO
 
 == classify
 
@@ -237,7 +235,26 @@ daemonStream.close();
 ----
 
 == eval
-//todo
+
+The `eval` function allows for use cases where new streaming expressions are generated on the fly and then evaluated.
+The `eval` function wraps a streaming expression and reads a single tuple from the underlying stream.
+The `eval` function then retrieves a string Streaming Expressions from the `expr_s` field of the tuple.
+The `eval` function then compiles the string Streaming Expression and emits the tuples.
+
+=== eval Parameters
+
+* `StreamExpression`: (Mandatory) The stream which provides the streaming expression to be evaluated.
+
+=== eval Syntax
+
+[source,text]
+----
+eval(expr)
+----
+
+In the example above the `eval` expression reads the first tuple from the underlying expression. It then compiles and
+executes the string Streaming Expression in the epxr_s field.
+
 
 [[StreamingExpressions-executor]]
 == executor

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/da03b1e9/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 97a1ca4..973d135 100644
--- a/solr/solr-ref-guide/src/stream-sources.adoc
+++ b/solr/solr-ref-guide/src/stream-sources.adoc
@@ -284,6 +284,7 @@ The `significantTerms` function queries a SolrCloud collection, but instead of r
 
 * `collection`: (Mandatory) The collection that the function is run on.
 * `q`: (Mandatory) The query that describes the foreground document set.
+* `field`: (Mandatory) The field to extract the terms from.
 * `limit`: (Optional, Default 20) The max number of terms to return.
 * `minDocFreq`: (Optional, Defaults to 5 documents) The minimum number of documents the term must appear in on a shard. This is a float value. If greater then 1.0 then it's considered the absolute number of documents. If less then 1.0 it's treated as a percentage of documents.
 * `maxDocFreq`: (Optional, Defaults to 30% of documents) The maximum number of documents the term can appear in on a shard. This is a float value. If greater then 1.0 then it's considered the absolute number of documents. If less then 1.0 it's treated as a percentage of documents.
@@ -295,12 +296,14 @@ The `significantTerms` function queries a SolrCloud collection, but instead of r
 ----
 significantTerms(collection1,
                  q="body:Solr",
+                 field="author",
+                 limit="50",
                  minDocFreq="10",
                  maxDocFreq=".20",
                  minTermLength="5")
 ----
 
-In the example above the `significantTerms` function is querying `collection1` and returning at most 50 significant terms that appear in 10 or more documents but not more then 20% of the corpus.
+In the example above the `significantTerms` function is querying `collection1` and returning at most 50 significant terms from the `authors` field that appear in 10 or more documents but not more then 20% of the corpus.
 
 == shortestPath