-
Notifications
You must be signed in to change notification settings - Fork 25.2k
[DOCS] Adds painless transform examples #53274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Pinging @elastic/ml-core (:ml/Transform) |
Pinging @elastic/es-docs (>docs) |
Related to #53274 This PR adds anchors to sections in https://www.elastic.co/guide/en/elasticsearch/reference/master/search-aggregations-metrics-scripted-metric-aggregation.html so that they can be linked from other pages.
Co-Authored-By: Lisa Cawley <[email protected]>
Co-Authored-By: Lisa Cawley <[email protected]>
`last_doc` in the `state` object. | ||
<2> The `map_script` defines `current_date` based on the timestamp of the | ||
document, then compares `current_date` with `state.timestamp_latest`, finally | ||
returns `state.last_doc` from the shard. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For correctness I think we should explain new HashMap(...)
:
"By using new HashMap(...)
we copy the source document, this is important whenever you want to pass the full source object from one phase to the next."
But: let me clarify this with the painless developers, this might be a bug in painless.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
follow up issue: #53679
(will be picked up on thursday, so I expect some answer at the end of this week)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hendrikmuhs Thank you for this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the record: we decided to go forward with the workaround and change the documentation once #53679 got fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Co-authored-by: Lisa Cawley <[email protected]>
Backport commits: |
This PR adds a new sub-page to the Transforms documentation called Painless transform examples with short examples on how to use Painless in Transforms.
Preview: http://elasticsearch_53274.docs-preview.app.elstc.co/guide/en/elasticsearch/reference/master/transform-painless-examples.html