SOLR-10516: Add documention

This commit is contained in:
Joel Bernstein 2017-06-06 13:07:42 -04:00
parent 29de0f75e8
commit 09a9fdab6d
2 changed files with 24 additions and 4 deletions

View File

@ -23,8 +23,6 @@
== cartesianProduct == cartesianProduct
//TODO //TODO
== cell
//TODO
== classify == classify
@ -237,7 +235,26 @@ daemonStream.close();
---- ----
== eval == 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]] [[StreamingExpressions-executor]]
== executor == executor

View File

@ -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. * `collection`: (Mandatory) The collection that the function is run on.
* `q`: (Mandatory) The query that describes the foreground document set. * `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. * `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. * `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. * `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, significantTerms(collection1,
q="body:Solr", q="body:Solr",
field="author",
limit="50",
minDocFreq="10", minDocFreq="10",
maxDocFreq=".20", maxDocFreq=".20",
minTermLength="5") 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 == shortestPath