我在elasticsearch中有一些我需要查询的文档。这是我的映射
{
"mappings": {
"Daily": {
"properties": {
"campaignID":{
"type":"long"
},
"accountID":{
"type":"long"
}
}
}
}
}
这是我的一位医生:
{
"Website Registrations Completed": 0,
"3-Second Video Views": 0,
"Photo Views": 0,
"Website Adds to Wishlist": 0,
"Objective": "CONVERSIONS",
"Website Checkouts Initiated": 0,
"Clicks": 1091,
"Social Impressions": 36502,
"campaignID": 31842593123459132,
"Reach": 69745,
"Website Searches": 0,
"Website Leads": 0,
"Website Adds to Cart": 6,
"accountID": 9837295319561761,
"Page Likes": 72,
"Cpm": 46.657440197555,
"Ctr": 1.4803055589476002
}
这是我的疑问:
{
"query": {
"bool": {
"must": [
{
"term": {
"accountID": "9837295319561761"
}
}
]
}
}
}
这应该工作,但它给出空输出???为什么会发生这种情况。(我知道我可以直接使用术语查询来查询上述查询,但这实际上是更大查询的一部分。)
我试着用这个:
{
"query": {
"term": {
"accountID": "1007295319405768"
}
}
}