Skip to content

[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

Merged
merged 16 commits into from
Mar 23, 2020

Conversation

szabosteve
Copy link
Contributor

@szabosteve szabosteve commented Mar 9, 2020

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

@szabosteve szabosteve changed the title [DOCS] Adds painless transform examples [WIP][DOCS] Adds painless transform examples Mar 9, 2020
@szabosteve szabosteve added :ml/Transform Transform >docs General docs changes labels Mar 10, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/ml-core (:ml/Transform)

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-docs (>docs)

@szabosteve szabosteve changed the title [WIP][DOCS] Adds painless transform examples [DOCS] Adds painless transform examples Mar 16, 2020
@szabosteve szabosteve removed the WIP label Mar 16, 2020
`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.

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.

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)

Copy link
Contributor Author

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!

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.

@szabosteve szabosteve removed the v7.6.2 label Mar 17, 2020
@szabosteve szabosteve requested a review from hendrikmuhs March 23, 2020 09:08
Copy link

@hendrikmuhs hendrikmuhs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@szabosteve szabosteve merged commit 108f9ca into elastic:master Mar 23, 2020
@szabosteve szabosteve deleted the painless.transforms branch March 23, 2020 09:38
szabosteve added a commit to szabosteve/elasticsearch that referenced this pull request Mar 23, 2020
@szabosteve
Copy link
Contributor Author

Backport commits:
7.x: 534e734

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants