0
這裏是我發送給ElasticSearch查詢:ElasticSearch返回所有文件
http://localhost:9200/user-index/user/_search/?queryb%5Bname%5D=Richard
返回JSON是這樣的:
{
"hits": [
{
"_index": "user-index",
"_type": "user",
"_id": "WgrvE-DzQJminNreBIsRNA",
"_score": 1.0,
"_source": {
"name": "Richard",
"db_id": "7"
}
},
{
"_index": "user-index",
"_type": "user",
"_id": "GwMOuYbUR8y48RrG4HgXdg",
"_score": 1.0,
"_source": {
"name": "John",
"db_id": "8"
}
},
{
"_index": "user-index",
"_type": "user",
"_id": "C-bgK3pNTNiX9Cz0x8EftA",
"_score": 1.0,
"_source": {
"name": "Harold",
"db_id": "2"
}
}
]
}
只有那些真正的比賽之一。爲什麼把它們全部發回來?
我試圖通過他們的JSON,但事實證明,在我用的是創業板的第二個參數是不是爲主體內容,但URI編碼的數據。謝謝您的幫助! – Chris