# Does csv field order matter when indexing?

**URL:** <https://discuss.elastic.co/t/does-csv-field-order-matter-when-indexing/122952>\
**Category:** Logstash\
**Created:** [March 7, 2018, 7:40pm UTC](https://discuss.elastic.co/t/does-csv-field-order-matter-when-indexing/122952 "2018-03-07T19:40:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![spacepacket](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@spacepacket](https://discuss.elastic.co/u/spacepacket)\
**Post date:** [March 7, 2018, 7:40pm UTC](https://discuss.elastic.co/t/does-csv-field-order-matter-when-indexing/122952/1 "2018-03-07T19:40:33Z")

</div>

If I have logstash reading csv files, with fields in a particular order, and then I change the order in both the new csv files and the logstash config file, does logstash and/or elasticsearch care?

If I also add new fields into the csv records, does logstash or elasticsearch care?

In both cases, elasticsearch will have records with both the old and new order and fields.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [March 7, 2018, 8:26pm UTC](https://discuss.elastic.co/t/does-csv-field-order-matter-when-indexing/122952/2 "2018-03-07T20:26:10Z")

</div>

> I change the order in both the new csv files and the logstash config file, does logstash and/or elasticsearch care?

No.

> If I also add new fields into the csv records, does logstash or elasticsearch care?

Assuming you adjust Logstash's csv filter for the new columns, no.

---

<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:** [April 4, 2018, 8:26pm UTC](https://discuss.elastic.co/t/does-csv-field-order-matter-when-indexing/122952/3 "2018-04-04T20:26:45Z")

</div>

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