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:29:41 UTC

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

Repository: lucene-solr
Updated Branches:
  refs/heads/master 584b69d3f -> 1a0095002


Ref Guide: Add ceil 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/1a009500
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/1a009500
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/1a009500

Branch: refs/heads/master
Commit: 1a009500212f4ab679f059eec10ba73075d1fb1f
Parents: 584b69d
Author: Joel Bernstein <jb...@apache.org>
Authored: Fri Jun 16 14:29:31 2017 -0400
Committer: Joel Bernstein <jb...@apache.org>
Committed: Fri Jun 16 14:29:31 2017 -0400

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


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1a009500/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 bc6d13e..7f46312 100644
--- a/solr/solr-ref-guide/src/stream-evaluators.adoc
+++ b/solr/solr-ref-guide/src/stream-evaluators.adoc
@@ -229,9 +229,25 @@ mod(100,3) // returns the remainder of 100 / 3 .
 mod(100,fieldA) // returns the remainder of 100 divided by the value of fieldA.
 mod(fieldA,1.4) // returns the remainder of fieldA divided by 1.4.
 if(gt(fieldA,fieldB),mod(fieldA,fieldB),mod(fieldB,fieldA)) // if fieldA > fieldB then return the remainder of fieldA/fieldB, else return the remainder of fieldB/fieldA.
+----
 
 === ceil
-//TODO
+The `ceil` function rounds a decimal value to the next highest whole number.
+
+=== ceil Parameters
+
+* `Field Name | Raw Number | Number Evaluator`: The decimal to round up.
+
+=== ceil Syntax
+
+The expressions below show the various ways in which you can use the `ceil` evaluator.
+
+[source,text]
+----
+ceil(100.4) // returns the remainder of 100.
+ceil(fieldA) // returns the next highest whole number for fieldA.
+if(gt(fieldA,fieldB),ceil(fieldA),ceil(fieldB)) // if fieldA > fieldB then return the ceil of fieldA, else return the ceil of fieldB.
+----
 
 == floor
 //TODO