SOLR-12702: Add math expression userguid documentation

This commit is contained in:
Joel Bernstein 2018-08-27 16:10:15 -04:00
parent f4212a1df0
commit 659aed2de1
2 changed files with 40 additions and 2 deletions

View File

@ -573,3 +573,41 @@ When this expression is sent to the /stream handler it responds with:
}
}
----
== Z-scores
The `zscores` function converts a numeric array to an array of z-scores. The z-score
is the number of standard deviations a number is from the mean.
The example below computes the z-scores for the values in an array.
[source,text]
----
let(a=array(1,2,3),
b=zscores(a))
----
When this expression is sent to the /stream handler it responds with:
[source,json]
----
{
"result-set": {
"docs": [
{
"b": [
-1,
0,
1
]
},
{
"EOF": true,
"RESPONSE_TIME": 27
}
]
}
}
----

View File

@ -157,7 +157,7 @@ The `putCache` function adds a variable to the cache.
In the example below an array is cached in the *workspace* workspace1
and bound to the *key* key1. The workspace allows different users to cache
objects in their own workspace. The`putCache` function returns
objects in their own workspace. The `putCache` function returns
the variable that was added to the cache.
[source,text]
@ -213,7 +213,7 @@ responds with:
"result-set": {
"docs": [
{
"d": [
"a": [
11,
22,
33