zoukankan      html  css  js  c++  java
  • elasticsearch 学习

    docker run -p 9200:9200 -d elasticsearch #直接拉取运行

    #指定条件搜索
    curl --request GET --url 'http://localhost:9200/imooc/course/_search?q=ccmouse' --header 'Content-Type: application/json' --header 'Postman-Token: 6fa44711-5cf1-4f0a-a850-c9bfc8e40f73' --header 'cache-control: no-cache' --data '{ }' #不加条件搜索
    curl
    --request GET --url http://localhost:9200/imooc/course/_search --header 'Content-Type: application/json' --header 'Postman-Token: 7cfd436e-b1b7-4b35-b666-745890f8a843' --header 'cache-control: no-cache' --data '{ }'

    #put 添加数据
    curl
    --request PUT --url http://localhost:9200/imooc/course/1 --header 'Content-Type: application/json' --header 'Postman-Token: 78338af1-66e1-4d8a-831d-10e955f671df' --header 'cache-control: no-cache' --data '{ "name":"golang", "instructor": "ccmouse" }'

    #根据 id 搜索
    curl
    --request GET --url http://localhost:9200/imooc/course/1 --header 'Content-Type: application/json' --header 'Postman-Token: 12a8d19c-e353-4d7a-8ed2-7a9149e72e92' --header 'cache-control: no-cache' --data '{ "name":"golang", "instructor": "ccmouse" }'
    # _mapping
    curl
    --request GET --url http://localhost:9200/imooc/course/_mapping --header 'Content-Type: application/json' --header 'Postman-Token: 37acd15b-3157-442f-904d-b4f350d6ee17' --header 'cache-control: no-cache' --data '{ }'
  • 相关阅读:
    让程序调用运行linux shell命令
    纯C的字符串问题
    Linux的打包和解压缩命令
    ubuntu安装mosquitto-1.4.5
    无Teamview授权,使用Teamview方式
    有效利用家用宽带,动态域名服务(DDNS)
    pfx格式证书转成nginx可用的证书
    iis文件上传限制
    vue脚手架使用
    netcore中执行linux命令
  • 原文地址:https://www.cnblogs.com/jackluo/p/10765429.html
Copyright © 2011-2022 走看看