Skip to content

Commit

Permalink
Set system property for tests and update painless-getting-started
Browse files Browse the repository at this point in the history
  • Loading branch information
mayya-sharipova committed May 18, 2018
1 parent 8e71522 commit 3b5f421
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 9 deletions.
19 changes: 10 additions & 9 deletions docs/painless/painless-getting-started.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,6 @@ set a <<jvm-options,`jvm.option`>>
`-Des.script.null_for_missing_value=true` on a node. If you do not enable
this behavior, a deprecation warning is logged on start up.

===== Multiple values

Painless supports the following operations for multi-value numeric fields:

- `doc['field'].min` - gets the minimum value
- `doc['field'].max` - gets the maximum value
- `doc['field'].sum` - gets the sum of the values
- `doc['field'].avg` - gets the average of the values


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

[[multi-value-field-operations]]
=== Multi-value field operations

Painless supports the following operations for multi-value numeric fields:

- `doc['field'].min` - gets the minimum value
- `doc['field'].max` - gets the maximum value
- `doc['field'].sum` - gets the sum of the values
- `doc['field'].avg` - gets the average of the values

[[modules-scripting-painless-dispatch]]
=== How painless dispatches functions

Expand Down
3 changes: 3 additions & 0 deletions modules/parent-join/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ esplugin {
classname 'org.elasticsearch.join.ParentJoinPlugin'
hasClientJar = true
}
test.configure {
systemProperty 'es.script.null_for_missing_value', 'true'
}
4 changes: 4 additions & 0 deletions modules/percolator/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,7 @@ dependencyLicenses {

compileJava.options.compilerArgs << "-Xlint:-deprecation,-rawtypes"
compileTestJava.options.compilerArgs << "-Xlint:-deprecation,-rawtypes"

test.configure {
systemProperty 'es.script.null_for_missing_value', 'true'
}
4 changes: 4 additions & 0 deletions server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -338,3 +338,7 @@ if (isEclipse == false || project.path == ":server-tests") {
check.dependsOn integTest
integTest.mustRunAfter test
}

test.configure {
systemProperty 'es.script.null_for_missing_value', 'true'
}
1 change: 1 addition & 0 deletions x-pack/plugin/security/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ test {
* other if we allow them to set the number of available processors as it's set-once in Netty.
*/
systemProperty 'es.set.netty.runtime.available.processors', 'false'
systemProperty 'es.script.null_for_missing_value', 'true'
}

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

0 comments on commit 3b5f421

Please sign in to comment.