Hi all,
I have an array with several values. For example, in these two documents I have the following arrays:
1 - tags: ["Apple TV", "TV"]
2 - tags: ["Apple", "TV"]
If I want to search for "Apple TV", I can send a query as the following:
"query": {
"bool": {
"must": [
{"query_string": {"query": "Apple t* " , "analyze_wildcard": true}}
]
}
}
The problem in this case is that in this case the document #2 will get a higher score.
If I query with "Apple TV" as a phrase, the scoring will be what I expect, but sending a phrase won't allow me to use wildcards:
"query": {
"bool": {
"must": [
{"query_string": {"query": "\\"Apple t*\\" " , "analyze_wildcard": true}}
]
}
}
will not return any values...
So the question is:
How can I use wildcards in phrases so I can search for vales in Array that contains phrases and not just words?
Thanks