# Change the type of an index field during ingestion

**URL:** <https://discuss.elastic.co/t/change-the-type-of-an-index-field-during-ingestion/206831>\
**Category:** Logstash\
**Created:** [November 6, 2019, 4:10pm UTC](https://discuss.elastic.co/t/change-the-type-of-an-index-field-during-ingestion/206831 "2019-11-06T16:10:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kailash](https://avatars.discourse-cdn.com/v4/letter/k/2bfe46/32.png) [@kailash](https://discuss.elastic.co/u/kailash)\
**Post date:** [November 6, 2019, 4:10pm UTC](https://discuss.elastic.co/t/change-the-type-of-an-index-field-during-ingestion/206831/1 "2019-11-06T16:10:29Z")

</div>

I am using Fix Protocol plugin (open source by Connamara). One field NoMDEntries is created as Structure/Object. However, we want it to be of type nested. Changing it using PUT results in error reason": "object mapping [NoMDEntries] can't be changed from non-nested to nested".

I tried changing it in plugin  
./vendor/bundle/jruby/2.5.0/gems/logstash-filter-fix\_protocol-0.3.3/spec/filters/fix\_message\_spec.rb

from expect(hash["NoMDEntries"]).to be\_a(Array) to expect(hash["NoMDEntries"]).to be\_a(Nested) but this did not help.

Is there anyway I can convert it to Nested.

---

<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 4, 2019, 4:10pm UTC](https://discuss.elastic.co/t/change-the-type-of-an-index-field-during-ingestion/206831/2 "2019-12-04T16:10:34Z")

</div>

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