# How to store a string without it being parsed (C# / .NET)

**URL:** <https://discuss.elastic.co/t/how-to-store-a-string-without-it-being-parsed-c-net/51595>\
**Category:** Elasticsearch\
**Created:** [June 1, 2016, 5:35pm UTC](https://discuss.elastic.co/t/how-to-store-a-string-without-it-being-parsed-c-net/51595 "2016-06-01T17:35:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ThomasD3](https://avatars.discourse-cdn.com/v4/letter/t/eb9ed0/32.png) [@ThomasD3](https://discuss.elastic.co/u/ThomasD3)\
**Post date:** [June 1, 2016, 5:35pm UTC](https://discuss.elastic.co/t/how-to-store-a-string-without-it-being-parsed-c-net/51595/1 "2016-06-01T17:35:19Z")

</div>

I have IDs which as GUIDs like this:

> ee69cfc0-7750-2b6e-4c95-15fe5e26eec7

but I see that Elasticsearch stores it like that:

> "7750" "15fe5e26eec7" "2b6e" "4c95" "ee69cfc0"

I have tried:

> ```
> [String(Index = FieldIndexOption.No)]
> public string Id { get; set; }
> 
> ```

and

> ```
> [String(Index = FieldIndexOption.NotAnalyzed)]
> public string Id { get; set; }
> 
> ```

but the result is the same..

---

<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:** [June 1, 2016, 5:41pm UTC](https://discuss.elastic.co/t/how-to-store-a-string-without-it-being-parsed-c-net/51595/2 "2016-06-01T17:41:05Z")

</div>

The latter should work (I'm not familiar with the C# API but "not analyzed" is the right keyword), but keep in mind that you can't change the existing mapping of a field. You have to reindex the data.

---

<div class="post-metadata">

**Author:** ![ThomasD3](https://avatars.discourse-cdn.com/v4/letter/t/eb9ed0/32.png) [@ThomasD3](https://discuss.elastic.co/u/ThomasD3)\
**Post date:** [June 1, 2016, 7:17pm UTC](https://discuss.elastic.co/t/how-to-store-a-string-without-it-being-parsed-c-net/51595/3 "2016-06-01T19:17:59Z")

</div>

Yes, I have cleared the DB every time as I am working on a small local set of data.

_NotAnalyzed_ will still do the split at the '-' symbol.

The problem is that if a string like:

> ee69cfc0-7750-2b6e-4c95-15fe5e26eec7

gets split to:

> "7750" "15fe5e26eec7" "2b6e" "4c95" "ee69cfc0"

then '7750' becomes a match.

---

<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:** [June 1, 2016, 8:02pm UTC](https://discuss.elastic.co/t/how-to-store-a-string-without-it-being-parsed-c-net/51595/4 "2016-06-01T20:02:51Z")

</div>

Not analyzed means that it will be indexed as is without any transformation.

You might have another issue here.

---

<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 5, 2017, 10:47pm UTC](https://discuss.elastic.co/t/how-to-store-a-string-without-it-being-parsed-c-net/51595/5 "2017-07-05T22:47:09Z")

</div>


