0
我遇到了自動生成的elasticSearch查詢的問題。當運行它,七個碎片我使用索引六返回成功,第七返回此錯誤:調試ElasticSearch布爾查詢
index: "shard"
reason: "ClassCastException[
org.elasticsearch.common.mvel2.compiler.BlankLiteral cannot be cast to java.lang.Boolean]"
shard: 1
status: 500
successful: 6
total: 7
我怎樣才能弄清楚這是從哪裏來的,考慮到解釋端點由於根查詢是一個bool
,完全不會產生任何結果?
查詢如下:
{
"query": {
"bool": {
"must": [
{
"filtered": {
"query": {
"range": {
"date": {
"lte": "2014-05-21T21:59:59+00:00",
"gte": "2013-01-23T23:00:00+00:00"
}
}
},
"filter": {
"not": {
"terms": {
"idCountry": [
"9999"
]
}
}
}
}
},
{
"filtered": {
"query": {
"nested": {
"path": "reports",
"query": {
"terms": {
"reports.36317.flag": [
"o"
],
"minimum_should_match": 1
}
}
}
},
"filter": {
"nested": {
"path": "reports",
"filter": {
"exists": {
"field": "reports.36317"
}
}
}
}
}
}
]
}
},
"script_fields": {
"idTone": {
"script": "_source.reports[reportId].empty || _source.reports[reportId].idTone.empty ? _source.idLanguage : _source.reports[reportId].idTone",
"params": {
"reportId": "36317"
}
},
"tags": {
"script": "_source.reports[reportId].empty || _source.reports[reportId].tags.empty ? 'none' : _source.reports[reportId].tags",
"params": {
"reportId": "36317"
}
},
"flag": {
"script": "_source.reports[reportId].empty || _source.reports[reportId].flag.empty ? 'O' : _source.reports[reportId].flag",
"params": {
"reportId": "36317"
}
},
"synthesioRank": {
"script": "_source.reports[reportId].empty || _source.reports[reportId].synthesioRank.empty || _source.reports[reportId].synthesioRank == null ? '0' : _source.reports[reportId].synthesioRank",
"params": {
"reportId": "36317"
}
},
"idUserEngagement": {
"script": "_source.reports[reportId].empty || _source.reports[reportId].idUserEngagement == null ? '0' : _source.reports[reportId].idUserEngagement",
"params": {
"reportId": "36317"
}
},
"idStatus": {
"script": "_source.reports[reportId].empty || _source.reports[reportId].idStatus == null ? '0' : _source.reports[reportId].idStatus",
"params": {
"reportId": "36317"
}
}
},
"fields": [
"access",
"content",
"title",
"date",
"geo",
"idItem",
"idSiteType",
"idSite",
"idSource",
"idSourceType",
"idTopic",
"media",
"url",
"idLanguage",
"idDocument",
"idCountry"
]
}
謝謝你的提示!我會盡可能按照你的說法來做,並會保持你的進展。 –