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

Hi
I can't reindex, I get this error

  "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:

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"
  }
}

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?

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