Hello everyone,
I'm not sure if this is how the following is intended to work but with an index with the following settings and mapping:
{
"settings": {
"analysis": {
"analyzer": {
"myanalyzer": {
"type": "custom",
"tokenizer": "whitespace",
"filter": [
"lowercase",
"asciifolding"
]
}
}
}
},
"mappings":{
"mytype":{
"_all": {
"type": "text",
"index": "analyzed",
"analyzer": "myanalyzer",
"search_analyzer": "myanalyzer"
},
"properties":{
"post": {
"type": "text",
"analyzer": "myanalyzer",
"term_vector": "with_positions_offsets",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
},
"dynamic_templates": [
{ "en": {
"match": "*",
"match_mapping_type": "text",
"mapping": {
"type": "text",
"analyzer": "myanalyzer",
"search_analyzer": "myanalyzer"
}
}}
]
}
}
}
I'm trying to search for the following:
*TLM
Which does not return any results, however, the following does:
*tlm
Using any other case combination doesn't return any results either.
This is what I used for testing this scenario:
POST /myindex/_search
{
"explain": true,
"query": {
"bool":{
"filter":{
"range":{
"addDate":{
"from":"2015-01-16T01:55:15+02:00",
"include_lower":true,
"include_upper":true,
"to":"2017-03-15T01:55:15+02:00"
}
}
},
"must":{
"query_string":{
"query":"*tlM",
"allow_leading_wildcard": "true",
"default_operator": "AND"
}
}
}
},
"size": 1
}
Any help would be greatly appreciated!