Apache Lucene open-source search software
Ref Guide: Add ceil evaluator docs
Joel Bernstein1a009500212f
diff --git a/solr/solr-ref-guide/src/stream-evaluators.adoc b/solr/solr-ref-guide/src/stream-evaluators.adocindex bc6d13ecf89..7f46312407c 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