{
"_source": {
"id": 792477813014224900,
"metadata": {
"iso_language_code": "en",
"result_type": "recent"
},
"retweeted": false,
"retweet_count": 330,
"user": {
"id": 149250899,
"listed_count": 0,
"protected": false,
"followers_count": 347,
"entities": {
"description": {
"urls": []
}
},
"screen_name": "Zwido_"
}
在ES(Tweepy JSON)文件和我想搜索和USER_NAME領域基於查詢一個完整的文檔。 我tryied這個代碼
{
"nested": {
"path": "_source",
"score_mode": "avg",
"query": {
"bool": {
"must": [
{
"text": {"_source.user.user_name": user}
}
]
}
}
}
}
但它不工作,我收到錯誤
TransportError(400, 'search_phase_execution_exception', 'failed to parse search source. unknown search element [nested]
我做錯了嗎? 感謝您的幫助。
我接受了你的回答,它正在工作。我添加了「大小」:1,只過濾一個查詢。謝謝 – bezoadam
很高興幫助! – Val