Elasticsearch not analyzed field Elasticsearch not analyzed field elasticsearch elasticsearch

Elasticsearch not analyzed field


"index": "not_analyzed" means this field will be not analyzed at all (https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-index.html). So it will not be even split into words. I believe this is not what you want.Instead of that, you need to add new analyzer, which will include only tokenizer whitespace (https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-whitespace-tokenizer.html):

"analyzer" : {      "hu" : {          "tokenizer" : "standard",           "filter" : [ "lowercase", "hu_HU" ]       },       "no_filter":{           "tokenizer" : "whitespace"       }}

Then you need to use this new analyzer for your field:

"raw": {     "type": "string",     "analyzer": "no_filter",     "store": false}