HI!
I want filter my search by a value in a array. I have this in ES:
{
"_id" : "BeyKH2Cx",
"occupations" : ["d5ot2bwu","HwmXygzK"],
"name" : "Matthew McConaughey"
},
{
"_id" : "BeyKH2Cx",
"occupations" : ["HwmXygzK"],
"name" : "Matthew Nilan"
}
And i execute a search as below:
GET mongoindex/professionals/_search?search_type=dfs_query_and_fetch
{
"fields" : ["name", "_id","occupations"],
"query": {
"filtered": {
"query": {
"multi_match" : {
"query" : "stephen",
"fuzziness": 2,
"prefix_length": 1,
"fields" : ["artname","realname"],
"analyzer": "simple"
}
},
"filter" : {
"terms" : {
"occupations" : ["3qm3LsHP"]
}
}
}
}
}
But I have 0 results... If instead of "occupations":["3qm3LsHP"], I put
"_id":"BeyKH2Cx" it works, but I need filter by a value in the
"occupations" array. What is the way to make this work?
Thanks!
Best,
Emilio
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/6ea8f5be-7cd7-4caa-876d-00f68002ccd6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.