GET original_docs/_search
{
"_source": [
"styles",
"production_date_start"
],
"from": 20,
"size": 20,
"query": {
"bool": {
"filter": [
{
"nested": {
"path": "styles",
"query": {
"terms": {
"styles.name": [
"Gothic"
]
}
}
}
}
]
}
}
}
result
{
"_index" : "original_docs",
"_type" : "_doc",
"_id" : "77",
"_score" : 0.0,
"_source" : {
"production_date_start" : 1402,
"styles" : [
{
"name" : "Gothic"
},
{
"name" : "Renaissance"
}
]
}
},
When I add another value
"terms": {
"styles.name": [
"Gothic",
"Renaissance"
]
}
So I need that as a result there were documents where the styles field necessarily contained ["Gothic","Renaissance"] or other fields ["Gothic","Renaissance" ...], now it doesn't work like that, the results are displayed where there are only "Gothic" or "Renaissance" and ["Gothic","Renaissance" ...] only 3 variants are needed.