zoukankan      html  css  js  c++  java
  • doker es

    1.安装

    https://www.cnblogs.com/vincenshen/p/10872372.html
    docker run -it --name elasticsearch -d -p 127.0.0.1:9200:9200 -p 127.0.0.1:9300:9300 -p 127.0.0.1:5601:5601 elasticsearch:6.7.2
    docker run -it -d -e ELASTICSEARCH_URL=http://127.0.0.1:9200 --name kibana --network=container:elasticsearch kibana:6.7.2
    docker run -it --name elasticsearch-head -d -p 127.0.0.1:9100:9100 docker.io/mobz/elasticsearch-head:5

    2.

     es

      127.0.0.1:9200

      http://127.0.0.1:9200/user    put    //创建索引

      http://127.0.0.1:9200/user/apply/7  put         //添加或覆盖

      http://127.0.0.1:9200/user/apply/6  get   //获取文档或者索引
      http://127.0.0.1:9200/user/apply/6/_update/   post    //更改
      http://127.0.0.1:9200/user/apply/2   delete   //删除文档或者索引
      http://127.0.0.1:9200/user/apply/_search   get  //搜索
      http://127.0.0.1:9200/user/_analyze     //分词

            ik_max_word: 会将文本做最细粒度的拆分

            ik_smart: 会做最粗粒度的拆分

            { "text":"中华人民共和国,国歌","tokenizer": "ik_smart"}

     

    kibana

      127.0.0.1:5601

    head

      http://127.0.0.1:9100/ 

      //显示未连接  原因是es默认不支持跨域

      vi config/elasticsearch.yml 

      //添加

      http.cors.enabled: true

      http.cors.allow-origin: "*"

  • 相关阅读:
    Linux守护进程
    sequel pro无法连接mysql服务器
    socket编程之并发回射服务器2
    Unix的I/O模型
    nginx.conf laravel 配置
    phpstudy使用PHP+nginx配置Laravel
    nginx配置文件分开配置
    centos安装composer
    linux下 设置php的环境变量 php: command not found
    laravel 安装
  • 原文地址:https://www.cnblogs.com/wxtrip/p/13139729.html
Copyright © 2011-2022 走看看