Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deploy-manage/_snippets/field-doc-sec-limitations.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ When a user’s role enables document or [field level security](/deploy-manage/u

* The request cache is disabled for search requests if either of the following are true:

* The role query that defines document level security is [templated](/deploy-manage/users-roles/cluster-or-deployment-auth/controlling-access-at-document-field-level.md#templating-role-query) using a [stored script](/explore-analyze/scripting/modules-scripting-using.md#script-stored-scripts).
* The role query that defines document level security is [templated](/deploy-manage/users-roles/cluster-or-deployment-auth/controlling-access-at-document-field-level.md#templating-role-query) using a [stored script](/explore-analyze/scripting/modules-scripting-store-and-retrieve.md).
* The target indices are a mix of local and remote indices.
2 changes: 1 addition & 1 deletion deploy-manage/tools/snapshot-and-restore.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ By default, a snapshot of a cluster contains the cluster state, all regular data
- [Legacy index templates](https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-templates-v1.html)
- [Ingest pipelines](/manage-data/ingest/transform-enrich/ingest-pipelines.md)
- [ILM policies](/manage-data/lifecycle/index-lifecycle-management.md)
- [Stored scripts](/explore-analyze/scripting/modules-scripting-using.md#script-stored-scripts)
- [Stored scripts](/explore-analyze/scripting/modules-scripting-store-and-retrieve.md)
- For snapshots taken after 7.12.0, [feature states](#feature-state)

You can also take snapshots of only specific data streams or indices in the cluster. A snapshot that includes a data stream or index automatically includes its aliases. When you restore a snapshot, you can choose whether to restore these aliases.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ Deactivating a watch also enables you to keep it around for future use without d

You can use scripts and templates when defining a watch. Scripts and templates can reference elements in the watch execution context, including the watch payload. The execution context defines variables you can use in a script and parameter placeholders in a template.

{{watcher}} uses the Elasticsearch script infrastructure, which supports [inline](#inline-templates-scripts) and [stored](#stored-templates-scripts). Scripts and templates are compiled and cached by Elasticsearch to optimize recurring execution. Autoloading is also supported. For more information, see [Scripting](../../scripting.md) and [*How to write scripts*](../../scripting/modules-scripting-using.md).
{{watcher}} uses the Elasticsearch script infrastructure, which supports [inline](#inline-templates-scripts) and [stored](#stored-templates-scripts). Scripts and templates are compiled and cached by Elasticsearch to optimize recurring execution. Autoloading is also supported. For more information, see [Scripting](../../scripting.md) and [*How to write Painless scripts*](../../scripting/modules-scripting-using.md).


### Watch execution context [watch-execution-context]
Expand Down
17 changes: 13 additions & 4 deletions explore-analyze/scripting/common-script-uses.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,19 @@ products:
- id: elasticsearch
---

# Common scripting use cases [common-script-uses]
# Painless script tutorials [common-script-uses]

You can write a script to do almost anything, and sometimes, that’s the trouble. It’s challenging to know what’s possible with scripts, so the following examples address common uses cases where scripts are really helpful.

* [Field extraction](scripting-field-extraction.md)
You can write a script to do almost anything, and sometimes, that’s the challenge. It’s difficult to know what’s possible with scripts, so these tutorials address common use cases where scripts are particularly helpful.

Painless scripting becomes powerful when applied to real-world scenarios. These tutorials walk you through essential patterns and operations, providing working examples you can modify for your specific use cases.

* [Accessing document fields and special variables](/explore-analyze/scripting/modules-scripting-fields.md)
* [Accessing fields in a document](/explore-analyze/scripting/script-fields-api.md)
* [Converting data types](/explore-analyze/scripting/modules-scripting-type-casting-tutorial.md)
* [Dissecting data](/explore-analyze/scripting/dissect.md)
* [Extracting fields](/explore-analyze/scripting/scripting-field-extraction.md)
* [Grokking grok](/explore-analyze/scripting/grok.md)
* [Scripts, caching, and search speed](/explore-analyze/scripting/scripts-search-speed.md)
* [Updating documents](/explore-analyze/scripting/modules-scripting-document-update-tutorial.md)
* [Using Painless regular expressions](/explore-analyze/scripting/modules-scripting-regular-expressions-tutorial.md)
* [Working with dates](/explore-analyze/scripting/modules-scripting-datetime-tutorial.md)
Loading