I have index settings and mappings are as below
"settings": {
"number_of_shards": 1,
"number_of_replicas": 1,
"index": {"max_result_window": 10000000, "max_inner_result_window": 1000},
"analysis": {
"analyzer": {
"custom_analyzer": {
"type": "custom",
"tokenizer": "whitespace",
"filter": ["lowercase", "stop", "asciifolding"],
"char_filter": ["html_strip"],
},
"sort_analyzer": {
"type": "custom",
"tokenizer": "keyword",
"filter": ["lowercase", "asciifolding"],
"char_filter": ["html_strip"],
},
}
},
},
"mappings": {
"dynamic": "strict",
"properties": {
"uuid": {"type": "keyword"},
"task_number": {"type": "integer"},
"task": {
"type": "text",
"fields": {"keyword": {"type": "keyword"}},
"analyzer": "sort_analyzer",
"fielddata": True,
}
}
"task" : " Test User Data"
now I need to create a search query where if the user search "ser" it can see this above string but if user added "Test User Data Test User Data" it won't be able to see the result