# Logstash The order of synchronized data fields is inconsistent with the source end

**URL:** <https://discuss.elastic.co/t/logstash-the-order-of-synchronized-data-fields-is-inconsistent-with-the-source-end/347509>\
**Category:** Logstash\
**Created:** [November 20, 2023, 7:52am UTC](https://discuss.elastic.co/t/logstash-the-order-of-synchronized-data-fields-is-inconsistent-with-the-source-end/347509 "2023-11-20T07:52:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![haimaren](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/haimaren/32/127743_2.png) [@haimaren](https://discuss.elastic.co/u/haimaren)\
**Post date:** [November 20, 2023, 7:52am UTC](https://discuss.elastic.co/t/logstash-the-order-of-synchronized-data-fields-is-inconsistent-with-the-source-end/347509/1 "2023-11-20T07:52:00Z")

</div>

My Logstash Configuration

```auto
input {
     elasticsearch {
       hosts => "http://172.19.23.12:9200"
       index => "*"
       size => 1000
       scroll => "5m"
       docinfo => true
     }
   }

filter {
    mutate {
        remove_field => ["@timestamp", "@version"]
    }
}

output {
      elasticsearch {
        hosts => "http://elasticsearch-master.camunda.svc.cluster.local:9200"
        index => "%{[@metadata][_index]}"
        document_type => "%{[@metadata][_type]}"
        document_id => "%{[@metadata][_id]}"
  }
}

```

Here are the results after synchronization:

 ![es](https://us1.discourse-cdn.com/elastic/original/3X/a/6/a6d50ae4550428772a8fd7bc46f8a93aacaaee74.png)

but The result I want is that the migrated data is exactly the same

---

<div class="post-metadata">

**Author:** ![sholzhauer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sholzhauer/32/110282_2.png) [@sholzhauer](https://discuss.elastic.co/u/sholzhauer)\
**Post date:** [November 20, 2023, 10:29am UTC](https://discuss.elastic.co/t/logstash-the-order-of-synchronized-data-fields-is-inconsistent-with-the-source-end/347509/2 "2023-11-20T10:29:58Z")

</div>

Hi,

From what I can see your data is actually the same, json does not guarantee the order of fields is the same throughout its handling. BUT the nested DO remains the same.

So in you example, the key `value.elementId` exists on both sides (left and right). That means there is no impact on how elasticsearch is aware of your data.

Conclusion: I don't see a difference from elasticsearch perspective.

---

<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:** [December 18, 2023, 10:30am UTC](https://discuss.elastic.co/t/logstash-the-order-of-synchronized-data-fields-is-inconsistent-with-the-source-end/347509/3 "2023-12-18T10:30:33Z")

</div>

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