mirror of https://github.com/apache/lucene.git
SOLR-12702: Add math expression userguid documentation
This commit is contained in:
parent
f4212a1df0
commit
659aed2de1
|
@ -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
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
----
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue