# Datatypes a mess after reindexing

**URL:** <https://discuss.elastic.co/t/datatypes-a-mess-after-reindexing/332055>\
**Category:** Elasticsearch\
**Created:** [May 2, 2023, 12:06am UTC](https://discuss.elastic.co/t/datatypes-a-mess-after-reindexing/332055 "2023-05-02T00:06:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![GregoryJC](https://avatars.discourse-cdn.com/v4/letter/g/c37758/32.png) [@GregoryJC](https://discuss.elastic.co/u/GregoryJC)\
**Post date:** [May 2, 2023, 12:06am UTC](https://discuss.elastic.co/t/datatypes-a-mess-after-reindexing/332055/1 "2023-05-02T00:06:55Z")

</div>

Currently elastic version 7.17.3.

We recently reindexed and changed fields to text but we noticed that the field types got all messed up.

This is third party data, and we noticed that the field order is not the same in all of the docs which looks to be part of the cause of the problem. it looks like during reindexing the datatypes to use got applied according to field order, and not by field name.

Is this a bug or?

 ![MicrosoftTeams-image (1)](https://us1.discourse-cdn.com/elastic/original/3X/c/c/ccb9c68d71306404fab64f1eae46a8946460c67a.png)

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 2, 2023, 3:18am UTC](https://discuss.elastic.co/t/datatypes-a-mess-after-reindexing/332055/2 "2023-05-02T03:18:07Z")

</div>

Please don't post pictures of text, logs or code. They are difficult to read, impossible to search and replicate (if it's code), and some people may not be even able to see them 🙂

> [@GregoryJC](#):
>
> This is third party data, and we noticed that the field order is not the same in all of the docs which looks to be part of the cause of the problem. it looks like during reindexing the datatypes to use got applied according to field order, and not by field name.

JSON does not guarantee field ordering in anyway sorry to say.

---

<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 30, 2023, 3:18am UTC](https://discuss.elastic.co/t/datatypes-a-mess-after-reindexing/332055/3 "2023-05-30T03:18:18Z")

</div>

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