一.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