I'm using the following mapping:
"letters": {
"mappings": {
"letter": {
"properties": {
"destCode": {
"type": "string",
"index": "not_analyzed"
},
"tag": {
"type": "string",
"index": "not_analyzed"
}
}
}
}
}
My docs contains two fields:
- tag: mostly alphanumeric and may contain some '/' or '@'chars
- destCode: 99% a numeric string
The following query_String (i know wildcards are bad):
"query": {
"query_string": {
"default_field": "destCode",
"query": "*604"
}
}
correctly matches 0144604, 4521604 destCode values.
But it doesn't work for tag field, for ex the query:
"query": {
"query_string": {
"default_field": "tag",
"query": "CDG*"
}
}
does not match values: CDG711892, CDG88978 and i also tried lowercase cdg* without success.