0
查詢索引的類型與查詢字符串匹配任何財產匹配查詢某個字段
{
"size": 2,
"_source":["awardeeName"],
"query": {
"query_string" : {
"query": "health"
}
}
}
}
這將返回兩個記錄
[
{
"_index": "docm-es",
"_type": "document",
"_id": "9d8c832d-f22f-463e-9102-4aefcaff88fa",
"_score": 0.74211,
"_source": {
"awardeeName": "State of Hawaii Department of Health"
}
},
{
"_index": "docm-es",
"_type": "document",
"_id": "79963a60-8e9e-45ac-b7f8-6dc99f6b0621",
"_score": 0.6427368,
"_source": {
"awardeeName": "New York State Department of Health"
}
}
]
無論是記錄顯示,財產awardeename包含文字健康。 查詢與比賽現場awardeeName文本健康搜索,
{
"size": 2,
"_source":["awardeeName"],
"query": {
"match" : {
"awardeeName": "health"
}
}
}
}
這不返回任何命中,什麼是錯的,在此查詢,請指點。
我看到映射的映射更新的問題,awardeeName字段沒有分析,我學會了應該被索引全文搜索 – user884424