我有一個 Elastic Search 資料存盤,我在其中存盤 JSON 資料。
假設它具有以下格式:
{
"orderNumber": "1234"
"contactInformation": {
"firstName": "Jane",
"lastName" : "Doe",
"email": "[email protected]"
}
}
假設contactInformation.email 是一個可選屬性,并且該屬性本身可能不會出現在所有記錄中。我想檢索存在屬性電子郵件的所有記錄。我將在 Kibana 控制臺中為此使用什么查詢。
uj5u.com熱心網友回復:
您需要使用存在查詢
GET /_search
{
"query": {
"exists": {
"field": "contactInformation.email"
}
}
}
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/467169.html
