# Can't reindex: Error extracting routing: Routing values must be strings

**URL:** <https://discuss.elastic.co/t/cant-reindex-error-extracting-routing-routing-values-must-be-strings/330479>\
**Category:** Elasticsearch\
**Tags:** reindex\
**Created:** [April 20, 2023, 8:13pm UTC](https://discuss.elastic.co/t/cant-reindex-error-extracting-routing-routing-values-must-be-strings/330479 "2023-04-20T20:13:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![A\_Mightiev](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/a_mightiev/32/62186_2.png) [@A\_Mightiev](https://discuss.elastic.co/u/A_Mightiev)\
**Post date:** [April 20, 2023, 8:13pm UTC](https://discuss.elastic.co/t/cant-reindex-error-extracting-routing-routing-values-must-be-strings/330479/1 "2023-04-20T20:13:17Z")

</div>

Hi  
I can't reindex, I get this error

```auto
  "failures": [
    {
      "index": "metricbeat-000003",
      "cause": {
        "type": "illegal_argument_exception",
        "reason": "Error extracting routing: Routing values must be strings but found [START_ARRAY]",
        "caused_by": {
          "type": "parsing_exception",
          "reason": "Routing values must be strings but found [START_ARRAY]",
          "line": 1,
          "col": 36
        }
      },
      "status": 400
    },

```

Any idea what is happening?  
I do have a ingest pipeline that converts the process.pid into a string and name into process.pid\_s, I noticed some documents the process.pid doesn't exist because metricbeat had an error, so I am filtering them out, but still I can't reindex them  
This is how I'm reindexing:

```auto
POST _reindex?wait_for_completion=true
{
  "source": {
    "index": ".ds-metricbeat-8.6.1-2023.03.03-000003",
    "query": {
      "bool": {
        "must": [
          {
            "match": {
              "metricset.name": "process"
            }
          },
          {
            "exists": {
              "field": "process.pid"
            }
          }
        ],
        "must_not": [
          {
            "exists": {
              "field": "error"
            }
          }
        ]
      }
    }
  },
  "dest": {
    "index": "metricbeat-000003"
  }
}

```

---

<div class="post-metadata">

**Author:** ![A\_Mightiev](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/a_mightiev/32/62186_2.png) [@A\_Mightiev](https://discuss.elastic.co/u/A_Mightiev)\
**Post date:** [April 21, 2023, 8:09am UTC](https://discuss.elastic.co/t/cant-reindex-error-extracting-routing-routing-values-must-be-strings/330479/2 "2023-04-21T08:09:37Z")

</div>

Here's a more mysterious piece of the puzzle:  
This metricbeat spans over 4 days, if I do it all at once it doesn't work, but if I do a reindex day by day then it works, how is that possible?

---

<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:** [May 19, 2023, 8:09am UTC](https://discuss.elastic.co/t/cant-reindex-error-extracting-routing-routing-values-must-be-strings/330479/3 "2023-05-19T08:09:44Z")

</div>

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