I have a field, let's call it MyField
mapped as a keyword
type.
If I search using simple_query_string
, like so:
GET /my-index/_search
{
"from": 0,
"size": 1000,
"query": {
"bool": {
"filter": [
{
"simple_query_string": {
"query": "l120 2007:09:11 98c57u495891",
"fields": [
"MyField^1.0"
],
"flags": -1,
"default_operator": "and",
"analyze_wildcard": true,
"auto_generate_synonyms_phrase_query": true,
"fuzzy_prefix_length": 0,
"fuzzy_max_expansions": 50,
"fuzzy_transpositions": true,
"boost": 1
}
}
],
"adjust_pure_negative": true,
"boost": 1
}
},
"explain": false,
"_source": {
"includes": [],
"excludes": []
},
"track_total_hits": 10000
}
returns no results. But if I search specifically using bool filter:
GET /index/_search
{
"from": 0,
"size": 1000,
"query": {
"bool": {
"filter": [
{
"term": {
"MyField": "l120 2007:09:11 98c57u495891"
}
}
],
"adjust_pure_negative": true,
"boost": 1.0
}
},
"explain": false,
"_source": {
"includes": [],
"excludes": []
},
"track_total_hits": 10000
}
then I do get results as expected.
Why doesn't the simple_query_string
search type give me results?
(es version 7.8.0)
Thanks for any help offered!