Ich habe folgende Abfrage:verschachtelte Abfrage unterstützt keine Filter
{
"query": {
"filtered": {
"query": {
"bool": {
"should": [
{
"wildcard": {
"translations.title": {
"value": "*abc*",
"boost": 2
}
}
},
{
"wildcard": {
"translations.subtitle": {
"value": "*abc*",
"boost": 1.9
}
}
},
{
"match": {
"translations.title": {
"query": "abc",
"fuzziness": 5
}
}
},
{
"match": {
"translations.subtitle": {
"query": "abc",
"fuzziness": 5
}
}
},
{
"wildcard": {
"series.translations.title": {
"value": "*abc*",
"boost": 0.5
}
}
},
{
"wildcard": {
"translations.subtitle": {
"value": "*abc*",
"boost": 0.5
}
}
},
{
"wildcard": {
"tags.text": {
"value": "*abc*",
"boost": 1.5
}
}
},
{
"match": {
"tags.text": {
"query": "abc",
"fuzziness": 5
}
}
},
{
"wildcard": {
"translations.content": {
"value": "*abc*"
}
}
}
]
}
},
"filter": {
"and": [
{
"term": {
"type": "video"
}
},
{
"term": {
"videoType": "brightcove"
}
},
{
"type": {
"value": "post-en"
}
},
{
"term": {
"isPublished": true
}
},
{
"term": {
"status": "published"
}
},
{
"term": {
"CategoryId": "4"
}
},
{
"range": {
"contentDuration": {
"from": "300001"
}
}
},
{
"nested": {
"path": "languages",
"filters": {
"term": {
"languages.id": "148"
}
}
}
}
]
}
}
},
"size": 20,
"from": 0,
}
Und es gibt Fehler:
"error": {
"root_cause": [
{
"type": "query_parsing_exception",
"reason": "[nested] query does not support [filters]",
"index": "nowness",
"line": 1,
"col": 1003
}
],
"type": "search_phase_execution_exception",
"reason": "all shards failed",
"phase": "query_fetch",
"grouped": true,
"failed_shards": [
{
"shard": 0,
"index": "nowness",
"node": "Wuh8rSunQ5mdAa2j-RYOBA",
"reason": {
"type": "query_parsing_exception",
"reason": "[nested] query does not support [filters]",
"index": "nowness",
"line": 1,
"col": 1003
}
}
]
}
}
Es geht um dieses Fragment klagt:
{
"nested": {
"path": "languages",
"filters": {
"term": {
"languages.id": "148"
}
}
}
}
Früher arbeiten , aber es ist nicht in der neuesten ES-Version. Wie kann ich diese Abfrage ändern, damit sie funktioniert?
arbeiten Es wäre ziemlich toll, wenn sie mindestens ein gottverdammtes Ding zwischen kleineren Versionsupdates gleich lassen würden. –