Movatterモバイル変換


[0]ホーム

URL:


Loading
  1. Elastic Docs/
  2. Explore and analyze/
  3. Scripting/
  4. Painless

How to write Painless scripts

Wherever scripting is supported in the Elasticsearch APIs, the syntax follows the same pattern; you specify the language of your script, provide the script logic (or source), and add parameters that are passed into the script:

"script": {  "lang":   "...",  "source" | "id": "...",  "params": { ... }}
lang
Specifies the language the script is written in. Defaults topainless.
source,id
The script itself, which you specify assource for an inline script orid for a stored script. Use thestored script APIs to create and manage stored scripts.
params
Specifies any named parameters that are passed into the script as variables.Use parameters instead of hard-coded values to decrease compile time.

Get started with Painless scripting:


[8]ページ先頭

©2009-2026 Movatter.jp