# Not analyzed attribute in nest 7.17

**URL:** <https://discuss.elastic.co/t/not-analyzed-attribute-in-nest-7-17/328600>\
**Category:** Elasticsearch\
**Tags:** language-clients\
**Created:** [March 27, 2023, 10:05am UTC](https://discuss.elastic.co/t/not-analyzed-attribute-in-nest-7-17/328600 "2023-03-27T10:05:58Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![reza\_setareh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/reza_setareh/32/117508_2.png) [@reza\_setareh](https://discuss.elastic.co/u/reza_setareh)\
**Post date:** [March 27, 2023, 10:05am UTC](https://discuss.elastic.co/t/not-analyzed-attribute-in-nest-7-17/328600/1 "2023-03-27T10:05:58Z")

</div>

hi everyone i want to use not analyzed attribute in nest 7.17 but i cant find it it was in old versions with this code `Index = FieldIndexOption.NotAnalyzed` thank you

---

<div class="post-metadata">

**Author:** ![gregbowers](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gregbowers/32/118978_2.png) [@gregbowers](https://discuss.elastic.co/u/gregbowers)\
**Post date:** [March 27, 2023, 10:39am UTC](https://discuss.elastic.co/t/not-analyzed-attribute-in-nest-7-17/328600/2 "2023-03-27T10:39:35Z")

</div>

In Elasticsearch's nested data type, the "not\_analyzed" attribute indicates that the field should be indexed but not analyzed, meaning that the field's value will be stored as is, without any tokenization or analysis. This is useful for fields that you want to search and filter on, but don't want Elasticsearch to modify the field's value in any way.

---

<div class="post-metadata">

**Author:** ![reza\_setareh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/reza_setareh/32/117508_2.png) [@reza\_setareh](https://discuss.elastic.co/u/reza_setareh)\
**Post date:** [March 27, 2023, 10:48am UTC](https://discuss.elastic.co/t/not-analyzed-attribute-in-nest-7-17/328600/3 "2023-03-27T10:48:04Z")

</div>

i just wanted to not analyze some id fields and numbers

---

<div class="post-metadata">

**Author:** ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)\
**Post date:** [March 27, 2023, 1:23pm UTC](https://discuss.elastic.co/t/not-analyzed-attribute-in-nest-7-17/328600/4 "2023-03-27T13:23:13Z")

</div>

Hi @reza_setareh,

Which version of the client where you using before? By `not_analyzed` are you referring to the old strong `analyzed` and `not_analyzed` behaviour as referenced in this [old topic](https://discuss.elastic.co/t/index-not-analyzed/126606) and [blog post](https://www.elastic.co/blog/strings-are-dead-long-live-strings)?

If so I think you're looking to make use of the `keyword` type that replaced `not_analyzed`. If you're using the [automapping feature of the client](https://www.elastic.co/guide/en/elasticsearch/client/net-api/7.17/auto-map.html#auto-map) it should infer the type to give text with a keyword subfield for String, or keyword for a couple of other types as per the [documentation](https://www.elastic.co/guide/en/elasticsearch/client/net-api/7.17/auto-map.html#inferred-dotnet-type-mapping). Or alternatively you can map manually [similar to the example in the documentation](https://www.elastic.co/guide/en/elasticsearch/client/net-api/7.17/fluent-mapping.html#_manual_mapping).

Do let me know if that is what you're not trying to do. Hope that helps!

---

<div class="post-metadata">

**Author:** ![reza\_setareh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/reza_setareh/32/117508_2.png) [@reza\_setareh](https://discuss.elastic.co/u/reza_setareh)\
**Post date:** [March 28, 2023, 9:45am UTC](https://discuss.elastic.co/t/not-analyzed-attribute-in-nest-7-17/328600/5 "2023-03-28T09:45:16Z")

</div>

thank you i think keyword is the right solution i want to some fields like Ids and email and etc dont analyze by analyzer so i can use keyword attribute am i right?

---

<div class="post-metadata">

**Author:** ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)\
**Post date:** [March 28, 2023, 10:42am UTC](https://discuss.elastic.co/t/not-analyzed-attribute-in-nest-7-17/328600/6 "2023-03-28T10:42:29Z")

</div>

That is what keyword is intended for. There's more details in the [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/keyword.html) if that helps.

---

<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 25, 2023, 10:43am UTC](https://discuss.elastic.co/t/not-analyzed-attribute-in-nest-7-17/328600/7 "2023-04-25T10:43:10Z")

</div>

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