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/16 18:03:22 UTC

lucene-solr:master: Ref Guide: Add pow evaluator docs

Repository: lucene-solr
Updated Branches:
  refs/heads/master e2d8f941e -> a5b1327ae


Ref Guide: Add pow evaluator docs


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

Branch: refs/heads/master
Commit: a5b1327aec3648f1582562ca5cfdcf024fa14a38
Parents: e2d8f94
Author: Joel Bernstein <jb...@apache.org>
Authored: Fri Jun 16 14:03:13 2017 -0400
Committer: Joel Bernstein <jb...@apache.org>
Committed: Fri Jun 16 14:03:13 2017 -0400

----------------------------------------------------------------------
 solr/solr-ref-guide/src/stream-evaluators.adoc | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a5b1327a/solr/solr-ref-guide/src/stream-evaluators.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/stream-evaluators.adoc b/solr/solr-ref-guide/src/stream-evaluators.adoc
index 3702f39..aec9bd2 100644
--- a/solr/solr-ref-guide/src/stream-evaluators.adoc
+++ b/solr/solr-ref-guide/src/stream-evaluators.adoc
@@ -192,7 +192,24 @@ if(gt(fieldA,fieldB),sub(fieldA,fieldB),sub(fieldB,fieldA)) // if fieldA > field
 ----
 
 == pow
-//TODO
+The `pow` function returns the value of its first parameter raised to the power of its second parameter.
+
+=== pow Parameters
+
+* `Field Name | Raw Number | Number Evaluator`: Parameter 1
+* `Field Name | Raw Number | Number Evaluator`: Parameter 2
+
+=== pow Syntax
+
+The expressions below show the various ways in which you can use the `pow` evaluator.
+
+[source,text]
+----
+pow(2,3) // returns 2 raised to the 3rd power.
+pow(4,fieldA) // returns 4 raised by the value of fieldA.
+pow(fieldA,1.4) // returns the value of fieldA raised by 1.4.
+if(gt(fieldA,fieldB),pow(fieldA,fieldB),pow(fieldB,fieldA)) // if fieldA > fieldB then raise fieldA by fieldB, else raise fieldB by fieldA.
+----
 
 == mod
 //TODO