I have a word index and I can't search phrases on elasticsearch. there is no result. I check tons of solutions but I can't implement them to my query.
My mapping looks like this;
PUT /words/_mapping
{
"properties": {
"text": {
"type": "keyword"
}
}
}
(if the type is text
everything worked as expected)
My elastic query looks like this;
GET /words/_search
{
"from": 0,
"query": {
"bool": {
"filter": [
{
"bool": {
"should": [
{
"query_string": {
"default_field": "text",
"default_operator": "AND",
"query": "*foo bar baz*"
}
}
]
}
}
]
}
},
"size": 100,
"track_total_hits": true
}
But there is no data
_id | _index | _score | _type | text |
---|---|---|---|---|
I expect the record that has `foo bar baz` value,
_id | _index | _score | _type | text |
---|---|---|---|---|
drDzzYQBu3ncIuw4vn10 | words | 0.0 | _doc | foo bar baz |
What is the problem? Could someone help?