Hello,
I have problem with creating query_string with wildcard and some special characters (whitespace, dash etc.)
I have field myText (type text), which can be pretty long. And it can contains something like this - Name : anytexthere.
When i`m looking for this text i can create query like this below, and I have correct match.
GET mylogs/_search
{
"query": {
"simple_query_string": {
"fields": [
"myText"
],
"query": "(Name\\ \\:\\ anytexthere)",
"default_operator": "AND"
}
}
}
But sometimes I want to do more complicated search and find all documents that match pattern like this Name : a??texthere
I tried to find it by query like this below, but it return 0 matches
GET mylogs/_search
{
"query": {
"simple_query_string": {
"fields": [
"myText"
],
"query": "(Name\\ \\:\\ a??texthere)",
"default_operator": "AND"
}
}
}
Could someone help me with that? I tried to set analyzer to keyword, but still the same.