一.es基础语法
1.索引curl
索引了解:可以了解成mysql的库,但是es中是没有库这个概念的
es是支持restful风格访问
1)使用postman创立索引
端口9200,索引people ,put方式
http://47.104.100.24:9200/people
使用head插件查看
图片上传失败
在Elasticsearch 6.0.0或者更高版本中创立的索引只包含一个mapping type。 在5.x中使用multiple mapping types创立的索引将继续像以前一样在Elasticsearch 6.x中运行。 Mapping types将在Elasticsearch 7.0.0中完全删除。
2)删除索引
delet方式
http://47.104.100.24:9200/people
图片上传失败
3)查询索引
get方式
http://47.104.100.24:9200/people
图片上传失败
2.文档crul
1).新添加文档
http://47.104.100.24:9200/people/main/1
图片上传失败
新添加成功,使用head查看
图片上传失败
2)删除文档
http://47.104.100.24:9200/people/main/1
图片上传失败
删除成功
3)修改文档
http://47.104.100.24:9200/people/main/1
http://47.104.100.24:9200/people/main/1
图片上传失败
4)查询文档
get方式
http://47.104.100.24:9200/people/main/1
有道云笔记分享
http://note.youdao.com/noteshare?id=4b87bc208b484d63bbfdf4f4a75153d6&sub=A1203BCADB304B47B74C6B93D0CE3813