通过文档Id搜索
Get
http://localhost:9200/megacorp/employee/1
结果
{
"_index": "megacorp",
"_type": "employee",
"_id": "1",
"_version": 1,
"_seq_no": 0,
"_primary_term": 1,
"found": true,
"_source": {
"first_name": "John",
"last_name": "Smith",
"age": 25,
"about": "I love to go rock climbing",
"interests": [
"sports",
"music"
]
}
}
简单搜索
Get
http://localhost:9200/megacorp/employee/_search