美文网首页
elasticsearch

elasticsearch

作者: Eazow | 来源:发表于2019-02-24 12:30 被阅读0次

    安装

    $ wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.5.1.zip
    $ unzip elasticsearch-5.5.1.zip
    $ cd elasticsearch-5.5.1/
    $ ./bin/elasticsearch
    

    注意不要用root用户运行,将elasticsearch放在其他用户工作目录

    测试是否运行成功

    $ curl localhost:9200
    
    {
      "name" : "es.10.91.3.37.0",
      "cluster_name" : "es",
      "version" : {
        "number" : "2.0.0",
        "build_hash" : "d7d6a2ae333a09006b54954759dd41dbe9aefb82",
        "build_timestamp" : "2016-06-02T09:13:39Z",
        "build_snapshot" : false,
        "lucene_version" : "5.2.1"
      },
      "tagline" : "You Know, for Search"
    }
    

    常用命令

    查看索引
    $ curl -X GET 'http://localhost:9200/_cat/indices?v'
    
    列出index包含的type
    $ curl 'localhost:9200/_mapping?pretty=true'
    

    相关文章

      网友评论

          本文标题:elasticsearch

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