# Existing mapping for \[user\] must be of type object but found \[text\]

**URL:** <https://discuss.elastic.co/t/existing-mapping-for-user-must-be-of-type-object-but-found-text/221929>\
**Category:** Logstash\
**Created:** [March 3, 2020, 5:36pm UTC](https://discuss.elastic.co/t/existing-mapping-for-user-must-be-of-type-object-but-found-text/221929 "2020-03-03T17:36:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![boyhittscar](https://avatars.discourse-cdn.com/v4/letter/b/e9bcb4/32.png) [@boyhittscar](https://discuss.elastic.co/u/boyhittscar)\
**Post date:** [March 3, 2020, 5:36pm UTC](https://discuss.elastic.co/t/existing-mapping-for-user-must-be-of-type-object-but-found-text/221929/1 "2020-03-03T17:36:57Z")

</div>

Hello!

I'm getting the following error out of logstash:

```
"reason"=>"Could not dynamically add mapping for field [user.name]. Existing mapping for [user] must be of type object but found [text]."}}}}

```

I've found another 2 forum posts that had no follow up (from the user) so I was unable to determine the correct fix.

I understand that the mapping in Elastic is different than what Logstash is attempting to Index. In this case I'm attempting to rename =\> user\_name to user.name to be ECS compliant. What else needs to be done to make sure the the field is being indexed correctly?

---

<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 31, 2020, 5:37pm UTC](https://discuss.elastic.co/t/existing-mapping-for-user-must-be-of-type-object-but-found-text/221929/2 "2020-03-31T17:37:08Z")

</div>

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