# Piece\_id.keyword vs piece\_id

**URL:** <https://discuss.elastic.co/t/piece-id-keyword-vs-piece-id/327584>\
**Category:** Elasticsearch\
**Created:** [March 13, 2023, 5:44pm UTC](https://discuss.elastic.co/t/piece-id-keyword-vs-piece-id/327584 "2023-03-13T17:44:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rafa\_H](https://avatars.discourse-cdn.com/v4/letter/r/b77776/32.png) [@Rafa\_H](https://discuss.elastic.co/u/Rafa_H)\
**Post date:** [March 13, 2023, 5:44pm UTC](https://discuss.elastic.co/t/piece-id-keyword-vs-piece-id/327584/1 "2023-03-13T17:44:36Z")

</div>

Hello everyone.

I am new to the community. I have a question related to elasticsearch and would appreciate your support.

In the platform we are developing, in the local env and staging env elasticsearch works only if keyword is added to the piece\_id, i.e. _piece\_id.keyword._ However, in the production it works without _keyword._ the plaform is written in drupal. the elasticsearch version in production is 5 in local/staging env is 7.

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 13, 2023, 6:11pm UTC](https://discuss.elastic.co/t/piece-id-keyword-vs-piece-id/327584/2 "2023-03-13T18:11:28Z")

</div>

What are the mappings in both environments? Could you share that here?

Oh! And indeed we changed so many things between version 5 and 7 that it might explain this.

So you need to provide the right mapping for version 7 so it will behave as you would expect.

---

<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 10, 2023, 6:12pm UTC](https://discuss.elastic.co/t/piece-id-keyword-vs-piece-id/327584/3 "2023-04-10T18:12:20Z")

</div>

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