Not analyzed attribute in nest 7.17

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

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.

i just wanted to not analyze some id fields and numbers

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 and blog post?

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 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. Or alternatively you can map manually similar to the example in the documentation.

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

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?

That is what keyword is intended for. There's more details in the documentation if that helps.

1 Like

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