Skip to content
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

Support lang and params in RuntimeField script for runtime_mappings #201

Closed
alejokf opened this issue Apr 18, 2024 · 1 comment · Fixed by #202
Closed

Support lang and params in RuntimeField script for runtime_mappings #201

alejokf opened this issue Apr 18, 2024 · 1 comment · Fixed by #202

Comments

@alejokf
Copy link
Contributor

alejokf commented Apr 18, 2024

Currently, RuntimeField does not support the lang and params fields inside the script for runtime_mappings, but this is supported by Elasticsearch.

Example:

{
  "runtime_mappings": {
    "measure": {
      "type": "long",
      "script": {
        "lang": "painless",
        "source": "emit(doc['measure'].value * params.factor);",
        "params": {
          "factor": 2
        }
      }
    }
  },
  "aggs": {
    "measure": {
      "terms": {
        "field": "measure"
      }
    }
  }
}

Ref: https://www.elastic.co/guide/en/elasticsearch/reference/current/runtime-mapping-fields.html

@alejokf
Copy link
Contributor Author

alejokf commented Apr 18, 2024

I opened a PR with the fix: #202

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

Successfully merging a pull request may close this issue.

1 participant