# Can I apply split processor on more than one field?

**URL:** <https://discuss.elastic.co/t/can-i-apply-split-processor-on-more-than-one-field/220040>\
**Category:** Elasticsearch\
**Created:** [February 19, 2020, 5:45pm UTC](https://discuss.elastic.co/t/can-i-apply-split-processor-on-more-than-one-field/220040 "2020-02-19T17:45:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![JohanP](https://avatars.discourse-cdn.com/v4/letter/j/c77e96/32.png) [@JohanP](https://discuss.elastic.co/u/JohanP)\
**Post date:** [February 19, 2020, 5:45pm UTC](https://discuss.elastic.co/t/can-i-apply-split-processor-on-more-than-one-field/220040/1 "2020-02-19T17:45:06Z")

</div>

I have a number on fields that I want to perform the same operation on in a reindex task:

- split values in a string to an array field,
- I want to do the same thing on several source fields.

Here is my reindex command

```
POST _reindex
{
  "source": {
    "index": "410"
  },
  "dest": {
    "index": "411",
    "pipeline": "split1"
  }
}

```

Here is the current pipeline that works to split values from the q5 field in index 410. So that works fine.

```
PUT _ingest/pipeline/split1
{
  "processors": [
    {
      "split": {
        "field": "q5",
        "separator": "[a-z][.] "
      }
    }
  ]
}

```

Now I would like to do the same to e.g. fields q6 and q7... but the split processor doesn't allow me to specify e.g. "field": ["q5","q6","q7"]

How would realize this in another way?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 19, 2020, 6:09pm UTC](https://discuss.elastic.co/t/can-i-apply-split-processor-on-more-than-one-field/220040/2 "2020-02-19T18:09:23Z")

</div>

What about this?

```
PUT _ingest/pipeline/split1
{
  "processors": [
    {
      "split": {
        "field": "q5",
        "separator": "[a-z][.] "
      }
    }, {
      "split": {
        "field": "q6",
        "separator": "[a-z][.] "
      }
    }
  ]
}
```

---

<div class="post-metadata">

**Author:** ![JohanP](https://avatars.discourse-cdn.com/v4/letter/j/c77e96/32.png) [@JohanP](https://discuss.elastic.co/u/JohanP)\
**Post date:** [February 19, 2020, 8:43pm UTC](https://discuss.elastic.co/t/can-i-apply-split-processor-on-more-than-one-field/220040/3 "2020-02-19T20:43:55Z")

</div>

Great, works fine I realize now (did actually test that already).  
Didn't fully grasp the error messages I received due to missing q6 fields in some documents, only the document containing both q5 and q6 got reindexed....

There is an "ignore\_missing": true option that I just found, which solved the problem.  
This is what it looks like now:

```
PUT _ingest/pipeline/split1
{
  "processors": [
    {
      "split": {
        "field": "q5",
        "separator": "[a-z][.] ",
        "ignore_missing": true
      }
    }, {
      "split": {
        "field": "q6",
        "separator": "[a-z][.] ",
        "ignore_missing": true
      }
    }
  ]
}

```

Thx for your fast reply, can stick with my plan 😉

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 18, 2020, 8:56pm UTC](https://discuss.elastic.co/t/can-i-apply-split-processor-on-more-than-one-field/220040/4 "2020-03-18T20:56:17Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
