!! 모든 요청에는 ApiKey를 헤더에 추가해줘야 한다.
test-index2
인덱스에 데이터(문서)를 추가해보자. 이 과정을 인덱싱이라고 하며, 각 문서는 JSON 형식으로 데이터를 저장해.
test-index2
인덱스에 새 문서를 추가하고, 문서는 이름, 나이, 관심사를 포함한 데이터를 갖게 될 것이야.POST /test-index2/_doc/
{
"name": "John Doe",
"age": 30,
"interests": ["football", "music"]
}
POST /test-index2/_doc/{ID 번호 적기}
POST /test-index2/_doc/1
{
"name": "John Doe",
"age": 30,
"interests": ["football", "music"]
}
test-index2
인덱스에 있는 모든 문서를 검색해줘.GET /test-index2/_search
{
"query": {
"match_all": {}
}
}