Hi, sorry if you get this question a lot but I don't think my queries are working the way I'd expect them to.
I have a nested object (let's call it tags) that looks like this:
[{"index":"en", "data": "tag_1"}, {"index":"pl", "data": "gat_2"}]
My query is something like this
{
"query": {
"bool": {
"should": [
{
"simple_query_string": {
"query": "gat*",
"fields": [
"title^2"
]
}
},
{
"bool": {
"filter": [
{
"match": {
"tags.index": {
"query": "en"
}
}
}
],
"must": [
{
"wildcard": {
"tags.data": {
"value": "gat*"
}
}
}
]
}
}
]
}
},
"from": 0,
"size": 5,
"track_total_hits": true
}
But I still get results that shouldn't be there, like it's searching through the nested object and doesn't actually look at the "index" field in it at all.
I've tried doing something similar previously and it was mostly working, but I think it might've just been a fluke.
I'd really appriate some help, thank you in advance.