Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

2019/11/4 7-14 【阶段总结】ES基础语法之索引&基础查询_慕课网


返回 7-14 【阶段总结】ES基础语法之索引&基础查询

【阶段总结】ES基础语法之索引&查询

章节

ES基础语法

问答
创建一个索引

笔记
PUT /test
{

下载
"settings" : {
"number_of_shards" : 1,
"number_of_replicas" : 1
的慕课
}
}

分布式节点建设
更新其replicas状态,但是不能更新shards状态

PUT /test/_settings
{
"settings" : {
"number_of_replicas" : 0
}
}

创建索引,指定id建立索引

PUT /employee/_doc/1
{
"name": "凯杰",
"age": 30
}

指定id全量修改索引

PUT /employee/_doc/1
{
"name": "凯dsfsf32杰",
"age"
}

指定id部分字断修改

POST employee/_update/1
{
"doc" : {
"name" : "new_name"
}
}

指定_create防止重复创建

POST /employee/_create/1/
{
"name": "凯1213132杰",
"age": 30
}

使用搜索全部

GET /employee/_search

获取指定id
https://coding.imooc.com/lesson/391.html#mid=29853 1/1

You might also like