# I want to migrate an index from a cluster to another index in the another cluster but I get error

**URL:** <https://discuss.elastic.co/t/i-want-to-migrate-an-index-from-a-cluster-to-another-index-in-the-another-cluster-but-i-get-error/354314>\
**Category:** Logstash\
**Created:** [February 28, 2024, 9:16am UTC](https://discuss.elastic.co/t/i-want-to-migrate-an-index-from-a-cluster-to-another-index-in-the-another-cluster-but-i-get-error/354314 "2024-02-28T09:16:11Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hatef\_Alipour](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hatef_alipour/32/120012_2.png) [@Hatef\_Alipour](https://discuss.elastic.co/u/Hatef_Alipour)\
**Post date:** [February 28, 2024, 9:16am UTC](https://discuss.elastic.co/t/i-want-to-migrate-an-index-from-a-cluster-to-another-index-in-the-another-cluster-but-i-get-error/354314/1 "2024-02-28T09:16:11Z")

</div>

Hi,  
I want to migrate an index to another cluster. I can't use reindex because source IP is not whitelisted. also I can't use snapshot  
I decided to do this task by writing a logstash pipeline you can see my pipeline below:

```auto
input {
    elasticsearch {
        hosts => "${INPUT_ES_HOSTS}"
        index => "${INPUT_INDEX}"
        user => "${INPUT_ES_USERNAME}"
        password => "${INPUT_ES_PASSWORD}"
        docinfo => true
        size => "${INPUT_ES_SIZE:5000}"
        scroll => "${INPUT_ES_SCROLL:5m}"
        ecs_compatibility => disabled
        docinfo_fields => ["_index", "_type", "_id"]
    }
}

output {
    elasticsearch {
        hosts => "${OUTPUT_ES_HOSTS}"
        user => "${OUTPUT_ES_USERNAME}"
        password => "${OUTPUT_ES_PASSWORD}"
        index => "%{[@metadata][_index]}"
        document_id => "%{[@metadata][_id]}"
        document_type => "%{[@metadata][_type]}"
    }
}

```

when this logstash pipeline starts, I get the following error:

> :response=\>{"index"=\>{"\_index"=\>"product-definition-v19", "\_id"=\>"a96bf648-388e-3f67-8f1a-f5dedd029dfd", "status"=\>400, "error"=\>{"type"=\>"document\_parsing\_exception", "reason"=\>"[1:3518] object mapping for [tags] tried to parse field [null] as object, but found a concrete value"}}}

_tags_ field is defined as follows:

```auto
        "tags" : {
          "properties" : {
            "confidence" : {
              "type" : "double"
            },
            "id" : {
              "type" : "keyword"
            }
          }
        }

```

And here is a sample of what its value looks like:

```auto
    "tags" : [
      {
        "confidence" : 0.932,
        "id" : "a96bf648-388e-3f67-8f1a-f5dedd029dfd"
      }
    ]

```

I appreciate any help  
Thank you.

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [February 28, 2024, 11:44am UTC](https://discuss.elastic.co/t/i-want-to-migrate-an-index-from-a-cluster-to-another-index-in-the-another-cluster-but-i-get-error/354314/2 "2024-02-28T11:44:05Z")

</div>

This error means that the mapping of the `tags` field in the destination index is not the same as the source index.

Before migrating you need to use the same template you used in your source index.

Also, keep in mind that `tags` is a base _ecs_ field used by logstash and all other tools in the stack, it should not be mapped as an object, but as a keyword as mentioned in the [documentation](https://www.elastic.co/guide/en/ecs/current/ecs-base.html#field-tags).

Mapping the `tags` field as an object may cause some issues as logstash uses this field in multiple filters.

---

<div class="post-metadata">

**Author:** ![Hatef\_Alipour](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hatef_alipour/32/120012_2.png) [@Hatef\_Alipour](https://discuss.elastic.co/u/Hatef_Alipour)\
**Post date:** [February 28, 2024, 12:23pm UTC](https://discuss.elastic.co/t/i-want-to-migrate-an-index-from-a-cluster-to-another-index-in-the-another-cluster-but-i-get-error/354314/3 "2024-02-28T12:23:50Z")

</div>

@leandrojmp Thank you so much

Source and destination index mappings are the same. you can see below  
source elastic 7.x

```auto
        "tags" : {
          "properties" : {
            "confidence" : {
              "type" : "double"
            },
            "id" : {
              "type" : "keyword"
            }
          }
        }

```

destination Elastic 8.12

```auto
        "tags": {
          "properties": {
            "confidence": {
              "type": "double"
            },
            "id": {
              "type": "keyword"
            }
          }
        }

```

As you can see they are the same.

I update the output filter like below but no success:

```auto
output {
# stdout {codec => "rubydebug"}
    elasticsearch {
        ecs_compatibility => disabled
        hosts => "${OUTPUT_ES_HOSTS}"
        user => "${OUTPUT_ES_USERNAME}"
        password => "${OUTPUT_ES_PASSWORD}"
        index => "%{[@metadata][_index]}"
        document_id => "%{[@metadata][_id]}"
        document_type => "%{[@metadata][_type]}"
    }
}

```

what do you suggest?

Thank you.

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [February 28, 2024, 12:29pm UTC](https://discuss.elastic.co/t/i-want-to-migrate-an-index-from-a-cluster-to-another-index-in-the-another-cluster-but-i-get-error/354314/4 "2024-02-28T12:29:20Z")

</div>

> [@Hatef\_Alipour](#):
>
> As you can see they are the same.

Yeah, but it is not what the logstash error is showing, so something is not right, maybe the template was not applied correctly.

Can you share the mapping of the index `product-definition-v19` in your destination cluster?

Just use `GET product-definition-v19/_mapping` on Kibana Dev Tools and share the result.

Also, share a sample document of the same index, use the following query:

```auto
GET product-definition-v19/_search
{
  "size": 1,
  "query": {
    "exists": {
      "field": "tags"
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![Hatef\_Alipour](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hatef_alipour/32/120012_2.png) [@Hatef\_Alipour](https://discuss.elastic.co/u/Hatef_Alipour)\
**Post date:** [February 28, 2024, 12:42pm UTC](https://discuss.elastic.co/t/i-want-to-migrate-an-index-from-a-cluster-to-another-index-in-the-another-cluster-but-i-get-error/354314/5 "2024-02-28T12:42:26Z")

</div>

> [@leandrojmp](#):
>
> ET product-definition-v19/\_mapping

sure.

Mapping of the destination index:

```auto
{
  "product-definition-v19": {
    "mappings": {
      "dynamic": "false",
      "properties": {
        "_class": {
          "type": "keyword",
          "index": false,
          "doc_values": false
        },
        "aggregaterating": {
          "properties": {
            "bestrating": {
              "type": "float"
            },
            "itemreviewed": {
              "type": "text"
            },
            "ratingcount": {
              "type": "float"
            },
            "ratingvalue": {
              "type": "float"
            },
            "reviewcount": {
              "type": "float"
            },
            "type": {
              "type": "text"
            },
            "worstrating": {
              "type": "float"
            }
          }
        },
        "ai": {
          "properties": {
            "ClassifierResult": {
              "properties": {
                "cat1": {
                  "type": "keyword"
                },
                "cat2": {
                  "type": "keyword"
                },
                "cat3": {
                  "type": "keyword"
                },
                "cat4": {
                  "type": "keyword"
                },
                "cat5": {
                  "type": "keyword"
                },
                "cat6": {
                  "type": "keyword"
                },
                "cat7": {
                  "type": "keyword"
                },
                "cat8": {
                  "type": "keyword"
                }
              }
            },
            "NerResult": {
              "properties": {
                "brand": {
                  "type": "text"
                },
                "category": {
                  "type": "text"
                },
                "feature": {
                  "type": "text"
                },
                "model": {
                  "type": "text"
                },
                "prod_cat": {
                  "type": "text"
                },
                "product": {
                  "type": "text"
                }
              }
            },
            "PageQuality": {
              "type": "double"
            },
            "RefinedName": {
              "type": "text",
              "fields": {
                "1gram": {
                  "type": "text",
                  "analyzer": "first_1gram",
                  "search_analyzer": "first_1gram_search"
                },
                "2gram": {
                  "type": "text",
                  "analyzer": "first_2gram",
                  "search_analyzer": "first_2gram_search"
                },
                "3gram": {
                  "type": "text",
                  "analyzer": "first_3gram",
                  "search_analyzer": "first_3gram_search"
                }
              },
              "analyzer": "refined_name_analyzer",
              "search_analyzer": "refined_name_search_analyzer"
            },
            "RefinedTitle": {
              "type": "text",
              "analyzer": "refined_name_analyzer",
              "search_analyzer": "refined_name_search_analyzer"
            },
            "product": {
              "properties": {
                "popularity": {
                  "type": "double"
                },
                "score": {
                  "type": "double"
                }
              }
            },
            "version": {
              "type": "keyword"
            }
          }
        },
        "aiDesc": {
          "type": "text"
        },
        "altBrand": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword"
            }
          },
          "analyzer": "persian"
        },
        "autoSeoEnabled": {
          "type": "boolean"
        },
        "available": {
          "type": "boolean"
        },
        "availableShopCount": {
          "type": "integer"
        },
        "brand": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword"
            }
          },
          "analyzer": "persian"
        },
        "brandIdentifier": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword"
            }
          }
        },
        "cat1": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        },
        "cat2": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        },
        "cat3": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        },
        "cat4": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        },
        "cat5": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        },
        "cat6": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        },
        "cat7": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        },
        "cat8": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        },
        "categoriesIdentifier": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword"
            }
          }
        },
        "classifier": {
          "properties": {
            "version": {
              "type": "keyword"
            }
          }
        },
        "creationTime": {
          "type": "date"
        },
        "discountModificationTime": {
          "type": "date"
        },
        "discountPercent": {
          "type": "byte"
        },
        "featured": {
          "type": "boolean"
        },
        "featuredLevel": {
          "type": "integer"
        },
        "image": {
          "type": "keyword",
          "ignore_above": 512
        },
        "metaTags": {
          "properties": {
            "collection": {
              "type": "text",
              "fields": {
                "keyword": {
                  "type": "keyword",
                  "ignore_above": 256
                }
              }
            }
          }
        },
        "model": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword"
            }
          },
          "analyzer": "persian"
        },
        "modificationTime": {
          "type": "date"
        },
        "names": {
          "type": "text",
          "fields": {
            "1gram": {
              "type": "text",
              "analyzer": "first_1gram",
              "search_analyzer": "first_1gram_search"
            },
            "2gram": {
              "type": "text",
              "analyzer": "first_2gram",
              "search_analyzer": "first_2gram_search"
            },
            "3gram": {
              "type": "text",
              "analyzer": "first_3gram",
              "search_analyzer": "first_3gram_search"
            }
          },
          "analyzer": "name_analyzer",
          "search_analyzer": "name_search_analyzer"
        },
        "ner": {
          "properties": {
            "brand": {
              "type": "text"
            },
            "category": {
              "type": "text"
            },
            "feature": {
              "type": "text"
            },
            "model": {
              "type": "text"
            },
            "prod_cat": {
              "type": "text",
              "fields": {
                "keyword": {
                  "type": "keyword"
                }
              }
            },
            "product": {
              "type": "text"
            },
            "version": {
              "type": "keyword"
            }
          }
        },
        "nonRefinedBrand": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword"
            }
          },
          "analyzer": "persian"
        },
        "page-quality": {
          "type": "float"
        },
        "persist": {
          "type": "boolean"
        },
        "price": {
          "type": "long"
        },
        "properties": {
          "type": "text",
          "analyzer": "persian"
        },
        "providerUrl": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        },
        "rank": {
          "type": "rank_feature"
        },
        "rankableShopCount": {
          "type": "rank_feature"
        },
        "refinedBrand": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword"
            }
          },
          "analyzer": "persian"
        },
        "relatedHosts": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword"
            }
          },
          "analyzer": "persian"
        },
        "relatedNames": {
          "type": "text",
          "analyzer": "persian"
        },
        "relatedShopsIdentifier": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword"
            }
          }
        },
        "representativeShopIdentifier": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword"
            }
          }
        },
        "representativeShopName": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        },
        "seoEnabled": {
          "type": "boolean"
        },
        "tag": {
          "properties": {
            "version": {
              "type": "keyword"
            }
          }
        },
        "tags": {
          "properties": {
            "confidence": {
              "type": "double"
            },
            "id": {
              "type": "keyword"
            }
          }
        },
        "title": {
          "type": "text",
          "analyzer": "persian"
        },
        "torobId": {
          "type": "keyword"
        },
        "totalShopCount": {
          "type": "integer"
        },
        "url": {
          "type": "keyword",
          "ignore_above": 512
        },
        "visits": {
          "type": "integer"
        }
      }
    }
  }
}

```

A sample from source index

```auto
{
  "took" : 6,
  "timed_out" : false,
  "_shards" : {
    "total" : 3,
    "successful" : 3,
    "skipped" : 0,
    "failed" : 0
  },
  "hits" : {
    "total" : {
      "value" : 10000,
      "relation" : "gte"
    },
    "max_score" : 1.0,
    "hits" : [
      {
        "_index" : "product-definition-v19",
        "_type" : "_doc",
        "_id" : "e40ee20e-6282-38f3-9933-3e750c6f3f69",
        "_score" : 1.0,
        "_source" : {
          "available" : true,
          "videos" : [],
          "representativeShopName" : "site.com",
          "cat8" : "none",
          "relatedHosts" : [
            "site.com"
          ],
          "cat6" : "none",
          "cat7" : "none",
          "aiTags" : [
            "dummy",
            "dummy",
            "dummy"
          ],
          "price" : 1111,
          "modificationTime" : "2024-01-08T13:22:01.491Z",
          "rank" : 0.5162081334432932,
          "model" : "dummy",
          "ner" : {
            "product" : "dummy",
            "feature" : "dummy",
            "model" : "dummy",
            "store" : "",
            "none" : "dummy",
            "category" : "microusb",
            "brand" : "dummy",
            "prod_cat" : "dummy"
          },
          "id" : "e40ee20e-6282-38f3-9933-3e750c6f3f69",
          "brand" : "dummy",
          "categoriesIdentifier" : [
            9390,
            4161
          ],
          "image" : [
          ],
          "images" : [
          ],
          "ner.version" : "v2.14.1.3",
          "totalShopCount" : 1,
          "discountModificationTime" : "2023-10-07T09:09:39.166Z",
          "relatedShopsIdentifier" : [
            "2"
          ],
          "providerUrl" : [
            "site.com"
          ],
          "tags" : [
            {
              "confidence" : 0.932,
              "id" : "e40ee20e-6282-38f3-9933-3e750c6f3f69"
            }
          ],
          "cat4" : "none",
          "cat5" : "none",
          "cat2" : "none",
          "cat3" : "none",
          "cat1" : "none",
          "classifier.version" : "v2.18.5.1",

          "creationTime" : "2023-10-07T09:09:39.166Z",
          "description" : "description",
          "title" : [
            "title"
          ],
          "visits" : 0,
          "rankableShopCount" : 1,
          "discountPercent" : 0,
          "relatedNames" : [
            "a name"
          ],
          "confidence" : 0,
          "tag.version" : "v2.10.3",
          "url" : "",
          "names" : [
            "a name "
          ],
          "accessory_check" : "0",
          "availableShopCount" : 1,
          "attributes" : { },
          "aggregateRating" : {
            "reviewcount" : 1.0,
            "ratingvalue" : 4.0,
            "ratingcount" : 0.0,
            "worstrating" : 0.0,
            "type" : "AggregateRating",
            "bestrating" : 5.0
          },
          "brandIdentifier" : "15513",
          "properties" : []
        }
      }
    ]
  }
}

```

_I have to exclude some fields_  
**because destination is empty is currently I include a doc from source**

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [February 28, 2024, 1:11pm UTC](https://discuss.elastic.co/t/i-want-to-migrate-an-index-from-a-cluster-to-another-index-in-the-another-cluster-but-i-get-error/354314/6 "2024-02-28T13:11:32Z")

</div>

Yeah, sorry just got the error right.

Just tested it here on how to get a similar error, and the issue seems to be in the source document that has a different mapping as the expected in the destination.

This message:

> object mapping for [tags] tried to parse field [null] as object, but found a concrete value

Really means that the destination mapping is an object, but the in the source document that logstash is trying to index the same field is not an object, but a keyword, something is not right.

Normally in the same log line you will have more information, like how the document looks like, can you look in the logs and share the entire log error for this issue?

Alternatively you can add a `file` our `stdout` output to see what logstash is really sending in the output.

As mentioned the `tags` field is an internal field used by logstash and using it may lead to issues.

Since you are migrating from 7 to 8, did you disabled the `ecs_compatibility` globally in `logstash.yml`?

---

<div class="post-metadata">

**Author:** ![Hatef\_Alipour](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hatef_alipour/32/120012_2.png) [@Hatef\_Alipour](https://discuss.elastic.co/u/Hatef_Alipour)\
**Post date:** [February 28, 2024, 1:37pm UTC](https://discuss.elastic.co/t/i-want-to-migrate-an-index-from-a-cluster-to-another-index-in-the-another-cluster-but-i-get-error/354314/7 "2024-02-28T13:37:25Z")

</div>

@leandrojmp Thank you for putting your time and effort into this.

I disabled `ecs_compatibility` only in input and output filter

Here is an error from logstash I only distort the values

```auto
[2024-02-28T10:56:20,126][WARN][logstash.outputs.elasticsearch][main][f367304aa46f25a8a19b6e9cdf76f288f96647dc34981825e117e9dbb0091be8] Could not index event to Elasticsearch. {:status=>400, :action=>["index", {:_id=>"2c4ccd16-4304-3dda-a0bd-da00b470921c", :_index=>"product-definition-v19", :routing=>nil}, {"cat6"=>"none", "id"=>"2c4ccd16-4304-3dda-a0bd-da00b470921c", "image"=>"site.com", "cat4"=>"dummy", "aggregaterating"=>nil, "tag.version"=>"v2.10.3", "categoriesIdentifier"=>[2825, 3345, 3398, 3417, 3420], "_class"=>"ir.sobhan.sobhan_product_definition_handler.model.elastic.ProductDefinition", "@version"=>"1", "representativeShopName"=>"site.com", "cat7"=>"none", "_tags"=>[[{"confidence"=>0.932e0, "id"=>"2c4ccd16-4304-3dda-a0bd-da00b470921c"}]], "creationTime"=>"2022-11-09T19:16:32.132Z", "tags"=>["_tagsparsefailure"], "seoEnabled"=>false, "cat1"=>"dummy", "ai"=>{"RefinedTitle"=>"dummy", "NameAnalyze"=>{"SuggestedBrands"=>[], "product_coverted"=>false, "ProductExists"=>true, "BrandExists"=>false, "RefinedBrand"=>"", "pbm_standard"=>"dummy", "pb_standard"=>"dummy", "related_prodcats"=>[], "ModelExists"=>false, "related_digikala_prodcat"=>"", "score"=>2}, "product"=>{"score"=>0.104e0, "url_score"=>0, "popularity"=>0}, "PageQuality"=>1, "RefinedNameB"=>"dummy", "ClassifierResult"=>{"confidence"=>1, "cat7"=>"none", "cat3"=>"dummy", "cat4"=>"dummy", "accessory_check"=>"0", "cat6"=>"none", "cat8"=>"none", "cat5"=>"dummy", "cat1"=>"dummy", "cat2"=>"dummy"}, "RefinedTitleB"=>"dummy", "RefinedName"=>"dummy", "NerResult"=>{"model"=>"", "feature"=>"dummy", "category"=>"", "prod_cat"=>"dummy", "product"=>"dummy", "brand"=>"", "none"=>"کد"}, "ProductRank"=>3, "BookRefined"=>false}, "brandIdentifier"=>"15513", "available"=>false, "cat3"=>"dummy", "relatedShopsIdentifier"=>["1"], "cat5"=>"dummy", "breadcrumblist"=>[{"title"=>"dummy", "url"=>{"uri"=>"/", "base"=>nil}}, {"title"=>" dummy", "url"=>{"uri"=>"/main/apparel/", "base"=>nil}}, {"title"=>"dummy", "url"=>{"uri"=>"/url/path", "base"=>nil}}, {"title"=>"dummy", "url"=>{"uri"=>"/url/", "base"=>nil}}, {"title"=>"dummy", "url"=>{"uri"=>"/url/", "base"=>nil}}, {"title"=>"dummy", "url"=>{"uri"=>"/url/", "base"=>nil}}, {"title"=>"dummy", "url"=>{"uri"=>"/url/path", "base"=>nil}}], "relatedHosts"=>["site.com"], "brandReviewed"=>false, "persist"=>false, "featured"=>false, "url"=>"", "model"=>"s00001", "ner.version"=>"v2.14.1.3", "providerUrl"=>["site.com"], "attributes"=>{}, "images"=>["site.com"], "totalShopCount"=>1, "classifier.version"=>"v2.18.5.1", "featuredLevel"=>0, "rank"=>0.21242115649715045e1, "videos"=>[], "refinedCategory"=>"dummy", "ner"=>{"model"=>"", "feature"=>"dummy", "category"=>"", "prod_cat"=>"dummy", "product"=>"dummy", "store"=>"", "brand"=>"", "none"=>"dummy"}, "cat2"=>"dummy", "description"=>"dummy", "altBrand"=>"dummy", "accessory_check"=>"0", "title"=>nil, "properties"=>["dummy"], "brand"=>"dummy", "names"=>["dummy"], "subCategory"=>"dummy", "representativeShopIdentifier"=>"1", "representativeShopNameFa"=>"dummy", "confidence"=>1, "availableShopCount"=>0, "relatedNames"=>["dummy"], "cat8"=>"none", "modificationTime"=>"2024-01-08T06:45:12.723Z", "@timestamp"=>2024-02-28T07:26:19.945750720Z, "aiTags"=>["dummy"], "favoritePrice"=>0, "ai.version"=>"v2.14.4.6"}], :response=>{"index"=>{"_index"=>"product-definition-v19", "_id"=>"2c4ccd16-4304-3dda-a0bd-da00b470921c", "status"=>400, "error"=>{"type"=>"document_parsing_exception", "reason"=>"[1:3448] object mapping for [tags] tried to parse field [null] as object, but found a concrete value"}}}}

```

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [February 28, 2024, 2:14pm UTC](https://discuss.elastic.co/t/i-want-to-migrate-an-index-from-a-cluster-to-another-index-in-the-another-cluster-but-i-get-error/354314/8 "2024-02-28T14:14:36Z")

</div>

Yeah, in your document the `tags` field is not an object.

Here is its value:

```auto
"tags"=>["_tagsparsefailure"]

```

You have another similar field named `_tags`

```auto
"_tags"=>[[{"confidence"=>0.932e0, "id"=>"2c4ccd16-4304-3dda-a0bd-da00b470921c"}]]

```

Not sure what is causing it, but I would say that your original `tags` field is conflicting with the logstash internal `tags` field.

As mentioned the `tags` field is a base ecs field that **should** be a keyword field and it is used like this in all tools in the stack.

I'm also not sure if it is possible to solve this using Logstash, you may try adding the following filter to see if it works:

```auto
filter {
    mutate {
        rename => { "_tags" => "tags" }
    }
}

```

If it does not work I think you will need to whitelist the source IP and use reindex from remote or use a snapshot.

---

<div class="post-metadata">

**Author:** ![Hatef\_Alipour](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hatef_alipour/32/120012_2.png) [@Hatef\_Alipour](https://discuss.elastic.co/u/Hatef_Alipour)\
**Post date:** [February 28, 2024, 2:18pm UTC](https://discuss.elastic.co/t/i-want-to-migrate-an-index-from-a-cluster-to-another-index-in-the-another-cluster-but-i-get-error/354314/9 "2024-02-28T14:18:43Z")

</div>

Thank you so much I appreciate your help.  
It is odd in the source index we don't have a field named ` _tags` I think Logstash added that to the event.  
I'll try your suggestions and let you know.

---

<div class="post-metadata">

**Author:** ![Hatef\_Alipour](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hatef_alipour/32/120012_2.png) [@Hatef\_Alipour](https://discuss.elastic.co/u/Hatef_Alipour)\
**Post date:** [February 28, 2024, 4:11pm UTC](https://discuss.elastic.co/t/i-want-to-migrate-an-index-from-a-cluster-to-another-index-in-the-another-cluster-but-i-get-error/354314/10 "2024-02-28T16:11:46Z")

</div>

@leandrojmp unfortunately it didn't work. But I guess your are right its because of `tags` that makes Logstash confused.  
I use elasticdump for migration, it is very slow but it works.

---

<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 27, 2024, 4:12pm UTC](https://discuss.elastic.co/t/i-want-to-migrate-an-index-from-a-cluster-to-another-index-in-the-another-cluster-but-i-get-error/354314/11 "2024-03-27T16:12:46Z")

</div>

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