opensearch-project / opensearch-project/OpenSearch

[FEATURE] add processors: set: copy_from

Open
#4,672 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement Indexing & Search Priority-Low
Dominant language
Java
Stars
13.7k
Forks
3k
Avg merge
2d 23h
Merged PRs (30d)
108

Description

Describe the bug
With Elasticsearch 7.11 (i.e. the version immediately after OpenSearch fork), "copy_from" option for the "set" processor has been introduced, here - https://www.elastic.co/guide/en/elasticsearch/reference/7.11/set-processor.html

this breaks a lot of pipelines, registering pipelines will throw the following error:

Exiting: 1 error: error loading pipeline for fileset system/auth: couldn't load pipeline: couldn't load json. Error: 400 Bad Request: {"error":{"root_cause":[{"type":"parse_exception","reason":"[value] required property is missing","processor_type":"set","property_name":"value"}],"type":"parse_exception","reason":"[value] required property is missing","processor_type":"set","property_name":"value"},"status":400}. Response body: {"error":{"root_cause":[{"type":"parse_exception","reason":"[value] required property is missing","processor_type":"set","property_name":"value"}],"type":"parse_exception","reason":"[value] required property is missing","processor_type":"set","property_name":"value"},"status":400}

a workaround is available and requires to change

processors:
  - set:
      field: myfiled
      copy_from: myvalue

to

processors:
- set:
    field: myfiled
    value: '{{myvalue}}'

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the set processor implementation and its ingest-pipeline tests, then compare the documented Elasticsearch 7.11 copy_from option with the current configuration handling. Update coverage for a set processor using copy_from and verify that the affected pipelines register without requiring value.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.