美文网首页程序员
4.es基本用法

4.es基本用法

作者: ant_1024 | 来源:发表于2018-09-03 18:11 被阅读4次

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

    相关文章

      网友评论

        本文标题:4.es基本用法

        本文链接:https://www.haomeiwen.com/subject/flyiwftx.html