# How to indexing primary key column datatype is String

**URL:** <https://discuss.elastic.co/t/how-to-indexing-primary-key-column-datatype-is-string/187099>\
**Category:** Elasticsearch\
**Created:** [June 24, 2019, 10:30am UTC](https://discuss.elastic.co/t/how-to-indexing-primary-key-column-datatype-is-string/187099 "2019-06-24T10:30:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gorrela\_lokesh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gorrela_lokesh/32/48629_2.png) [@gorrela\_lokesh](https://discuss.elastic.co/u/gorrela_lokesh)\
**Post date:** [June 24, 2019, 10:30am UTC](https://discuss.elastic.co/t/how-to-indexing-primary-key-column-datatype-is-string/187099/1 "2019-06-24T10:30:32Z")

</div>

In my application I have a one Entity class , In that class Primary Key column datatype is String. I am trying to indexing that Entity but it is not indexing.

If anyone know about this please give me a suggestions.

Thanks  
Lokesh

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [June 24, 2019, 10:32am UTC](https://discuss.elastic.co/t/how-to-indexing-primary-key-column-datatype-is-string/187099/2 "2019-06-24T10:32:37Z")

</div>

Hey,

can you please be more verbose and show an error message that you are getting, the way you are indexing data into Elasticsearch, how the JSON looks like, what exactly you are expecting as a response.

Asking a good question take time to write up, but will increase you chances of getting a proper response by magnitude.

Please see [https://www.elastic.co/help](https://www.elastic.co/help) for further information.

--Alex

---

<div class="post-metadata">

**Author:** ![gorrela\_lokesh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gorrela_lokesh/32/48629_2.png) [@gorrela\_lokesh](https://discuss.elastic.co/u/gorrela_lokesh)\
**Post date:** [June 24, 2019, 10:53am UTC](https://discuss.elastic.co/t/how-to-indexing-primary-key-column-datatype-is-string/187099/3 "2019-06-24T10:53:41Z")

</div>

Hi Alex

Thanks for your response.

---

<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:** [July 22, 2019, 11:05am UTC](https://discuss.elastic.co/t/how-to-indexing-primary-key-column-datatype-is-string/187099/4 "2019-07-22T11:05:58Z")

</div>

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