Pattern type search in Elasticsearch

Hello ,

I have two records like following.

record 1:

"codes" : "^|25325|UTY|4|^|58357|MKE|4|^|350082|MOT|3|^|25317|MTC|4|^|353501|MCE|1|"

record 2:

"codes" : "^|25325|MTC|4|^|58357|MTC|4|^|350082|MOT|3|^|25317|MTC|4|^|353501|MCE|1|"

For above data index schema is

"codes": {
"type": "text",
"fields": {
"raw": {
"type": "keyword",
"ignore_above": 256

When i search for |25325|MTC| the second record should return but it is returning both records . but i want exact match .
Tried pattern analyzers but not working as expected . please advice me how to achieve this.


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