Painless: Add Context Docs#31190
Conversation
examples are used.
|
Pinging @elastic/es-core-infra |
debadair
left a comment
There was a problem hiding this comment.
This is really good, nice job! Just left a few super minor comments.
| @@ -0,0 +1,58 @@ | |||
| [[painless-contexts]] | |||
| == Painless Contexts | |||
|
|
|||
There was a problem hiding this comment.
This is a style nit (and not sure I've caught it before), but we've agreed on Sentence style capitalization for headings. It's far from consistent across the docs, but we're trying to move in that direction, especially with new content.
| Use a Painless script in a {es_version}/docs-reindex.html[reindex] operation to | ||
| add, modify, or delete fields within each document in an original index as its | ||
| re-indexed into a target index. | ||
|
|
There was a problem hiding this comment.
"it's reindexed" We don't hyphenate reindex--we tend to close words up instead of hyphenating in general.
| `ctx['_op']`:: | ||
| Use the default of `'index'` to update a document. Set to `'none'` to | ||
| specify no operation or `'delete'` to delete the current document from | ||
| the index. |
There was a problem hiding this comment.
The single quotes aren't necessary, the monospace style is sufficient.
|
|
||
| `ctx['_op']`:: | ||
| Use the default of `'index'` to update a document. Set to `'none'` to | ||
| specify no operation or `'delete'` to delete the current document from |
There was a problem hiding this comment.
Same with the quotes. We generally don't use quotes to set off terms or keywords.
| {es_version}/index-modules-similarity.html[weight] for use in a | ||
| <<painless-similarity-context, similarity script>>. Weight is used to prevent | ||
| re-calculation of constants that remain the same across documents. | ||
|
|
There was a problem hiding this comment.
Again, just close it up, it's not necessary to hyphenate.
|
@debadair Thanks for the review! I believe I've addressed all the PR feedback, so this is ready for the next round. |
|
@debadair Thanks again! Will check in as soon as CI is passes. |
Adds documentation for each the variables and API available with each script context usable with a Painless script.
* 6.x: Fix not waiting for Netty ThreadDeathWatcher in IT (#31758) (#31789) [Docs] Correct default window_size (#31582) S3 fixture should report 404 on unknown bucket (#31782) [ML] Limit ML filter items to 10K (#31731) Fixture for Minio testing (#31688) [ML] Return statistics about forecasts as part of the jobsstats and usage API (#31647) [DOCS] Add missing get mappings docs to HLRC (#31765) [DOCS] Starting Elasticsearch (#31701) Fix coerce validation_method in GeoBoundingBoxQueryBuilder (#31747) Painless: Complete Removal of Painless Type (#31699) Consolidate watcher setting update registration (#31762) [DOCS] Adds empty 6.3.1 release notes page ingest: Introduction of a bytes processor (#31733) [test] don't run bats tests for suse boxes (#31749) Add analyze API to high-level rest client (#31577) Implemented XContent serialisation for GetIndexResponse (#31675) [DOCS] Typos DOC: Add examples to the SQL docs (#31633) Add support for AWS session tokens (#30414) Watcher: Reenable start/stop yaml tests (#31754) JDBC: Fix stackoverflow on getObject and timestamp conversion (#31735) Support multiple system store types (#31650) Add write*Blob option to replace existing blob (#31729) Split CircuitBreaker-related tests (#31659) Painless: Add Context Docs (#31190) Docs: Remove missing reference Migrate scripted metric aggregation scripts to ScriptContext design (#30111) Watcher: Fix chain input toXcontent serialization (#31721) Remove _all example (#31711) rest-high-level: added get cluster settings (#31706) Docs: Match the examples in the description (#31710) [Docs] Correct typos (#31720) Extend allowed characters for grok field names (#21745) (#31653) (#31722) [DOCS] Check for Windows and *nix file paths (#31648) [ML] Validate ML filter_id (#31535) Fix gradle4.8 deprecation warnings (#31654) Update numbers to reflect 4-byte UTF-8-encoded characters (#27083)
* master: [ML] Rate limit established model memory updates (#31768) [Docs] Correct default window_size (#31582) S3 fixture should report 404 on unknown bucket (#31782) Detach Transport from TransportService (#31727) [ML] Limit ML filter items to 10K (#31731) [ML] Return statistics about forecasts as part of the jobsstats and usage API (#31647) Fixture for Minio testing (#31688) [DOCS] Add missing get mappings docs to HLRC (#31765) [DOCS] Starting Elasticsearch (#31701) Painless: Complete Removal of Painless Type (#31699) Fix not waiting for Netty ThreadDeathWatcher in IT (#31758) Consolidate watcher setting update registration (#31762) Build: re-enabled bwc (#31769) ingest: Introduction of a bytes processor (#31733) Fix coerce validation_method in GeoBoundingBoxQueryBuilder (#31747) Add analyze API to high-level rest client (#31577) [DOCS] Typos DOC: Add examples to the SQL docs (#31633) Add support for AWS session tokens (#30414) Watcher: Reenable start/stop yaml tests (#31754) Implemented XContent serialisation for GetIndexResponse (#31675) JDBC: Fix stackoverflow on getObject and timestamp conversion (#31735) resolveHasher defaults to NOOP (#31723) Account for XContent overhead in in-flight breaker Split CircuitBreaker-related tests (#31659) Add write*Blob option to replace existing blob (#31729) Painless: Add Context Docs (#31190) Watcher: Fix chain input toXcontent serialization (#31721) Docs: Match the examples in the description (#31710) rest-high-level: added get cluster settings (#31706) [Docs] Correct typos (#31720) Clean up double semicolon code typos (#31687) [DOCS] Check for Windows and *nix file paths (#31648) [ML] Validate ML filter_id (#31535) Revert long lines Fix TransportChangePasswordActionTests
This adds information about all the different places a Painless script can be used in Elasticsearch and X-Pack. Each context is listed out with what variables and API are available, and what side-effects and return value affect upon script completion.