Skip to content

Commit 3b5f421

Browse files
Set system property for tests and update painless-getting-started
1 parent 8e71522 commit 3b5f421

File tree

5 files changed

+22
-9
lines changed

5 files changed

+22
-9
lines changed

docs/painless/painless-getting-started.asciidoc

+10-9
Original file line numberDiff line numberDiff line change
@@ -140,15 +140,6 @@ set a <<jvm-options,`jvm.option`>>
140140
`-Des.script.null_for_missing_value=true` on a node. If you do not enable
141141
this behavior, a deprecation warning is logged on start up.
142142

143-
===== Multiple values
144-
145-
Painless supports the following operations for multi-value numeric fields:
146-
147-
- `doc['field'].min` - gets the minimum value
148-
- `doc['field'].max` - gets the maximum value
149-
- `doc['field'].sum` - gets the sum of the values
150-
- `doc['field'].avg` - gets the average of the values
151-
152143

153144
[float]
154145
==== Updating Fields with Painless
@@ -388,6 +379,16 @@ Note: all of the `_update_by_query` examples above could really do with a
388379
as using any other query because script queries aren't able to use the inverted
389380
index to limit the documents that they have to check.
390381

382+
[[multi-value-field-operations]]
383+
=== Multi-value field operations
384+
385+
Painless supports the following operations for multi-value numeric fields:
386+
387+
- `doc['field'].min` - gets the minimum value
388+
- `doc['field'].max` - gets the maximum value
389+
- `doc['field'].sum` - gets the sum of the values
390+
- `doc['field'].avg` - gets the average of the values
391+
391392
[[modules-scripting-painless-dispatch]]
392393
=== How painless dispatches functions
393394

modules/parent-join/build.gradle

+3
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,6 @@ esplugin {
2222
classname 'org.elasticsearch.join.ParentJoinPlugin'
2323
hasClientJar = true
2424
}
25+
test.configure {
26+
systemProperty 'es.script.null_for_missing_value', 'true'
27+
}

modules/percolator/build.gradle

+4
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,7 @@ dependencyLicenses {
3636

3737
compileJava.options.compilerArgs << "-Xlint:-deprecation,-rawtypes"
3838
compileTestJava.options.compilerArgs << "-Xlint:-deprecation,-rawtypes"
39+
40+
test.configure {
41+
systemProperty 'es.script.null_for_missing_value', 'true'
42+
}

server/build.gradle

+4
Original file line numberDiff line numberDiff line change
@@ -338,3 +338,7 @@ if (isEclipse == false || project.path == ":server-tests") {
338338
check.dependsOn integTest
339339
integTest.mustRunAfter test
340340
}
341+
342+
test.configure {
343+
systemProperty 'es.script.null_for_missing_value', 'true'
344+
}

x-pack/plugin/security/build.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ test {
225225
* other if we allow them to set the number of available processors as it's set-once in Netty.
226226
*/
227227
systemProperty 'es.set.netty.runtime.available.processors', 'false'
228+
systemProperty 'es.script.null_for_missing_value', 'true'
228229
}
229230

230231
// xpack modules are installed in real clusters as the meta plugin, so

0 commit comments

Comments
 (0)