How to not analyzed a field in elasticsearch

Hi i have a brand_name field and its values are like "Hello World" means have spaces in between
i dont want to analyze it for exact matching

currently my mapping is this

"brand_name"  =>   [
                        "type"  =>   "text",                          
                        "fields"    =>   [
                           "keyword"   =>   [
                               "type"  =>   "keyword"

how can i achieve this ?


You can search on brand_name.keyword. As stated in the documentation "Keyword fields are only searchable by their exact value." :wink:

Best regards,

Charles Casadei

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