15. PUT
index type id
curl -XPUT http://localhost:9200/twitter/tweet/1 -d '
{
"user": "kimchy",
"post_date": "2012-11-26T20:12:00",
"message": "Trying out elasticsearch",
"score": 5
}
'
Sunday, December 16, 12
16. PUT
index type id
curl -XPUT http://localhost:9200/twitter/user/kimchy -d '
{
"name" : "Shay Banon"
}
'
Sunday, December 16, 12
17. GET
index type id
curl -XGET http://localhost:9200/twitter/tweet/1
{
"user": "kimchy",
"post_date": "2012-11-26T20:12:00",
"message": "Trying out elasticsearch",
"score": 5
}
}
Sunday, December 16, 12
18. SEARCH
index type id
curl -XGET http://localhost:9200/twitter/tweet/_search -d '{
"query" : {
"term" : { "user": "kimchy" }
}
}'
{
"user": "kimchy",
"post_date": "2012-11-26T20:12:00",
"message": "Trying out elasticsearch",
"score": 5
}
Sunday, December 16, 12
19. REST API
• ドキュメントの追加・削除
• 設定の追加・削除
• 全部HTTP APIでできる
• スキーマフリー
Sunday, December 16, 12
45. multi-tenant
• open/close index
• write I/O throttling
• merge policy control
• shard allocation
• number_of_replicas per index
Sunday, December 16, 12