Skip to content

Latest commit

 

History

History
13 lines (13 loc) · 941 Bytes

README.MD

File metadata and controls

13 lines (13 loc) · 941 Bytes

es

  1. 编辑配置文件:/etc/elasticsearch/elasticsearch.yml。添加对外提供服务的地址和端口
network.host: 127.0.0.1
http.port: 9200
xpack.ml.enabled: false
  1. 启动es:/usr/share/elasticsearch/bin/elasticsearch。然后访问服务:es
  2. 索引查询 其中student_index为索引名称,q为搜索关键字,pretty为格式化输出,默认为json
  3. 命令行查询curl -X POST -d '{"query":{"term":{"address.area.keyword":"南漳县"}}}' --header "Content-Type: application/json" http://localhost:9200/student_index/_search/

kibana

  1. 访问本地es配置。打开文件config/kibana.yml。放开elasticsearch.hosts: ["http://localhost:9200"]的注释;修改中文显示i18n.locale: "zh-CN"
  2. 启动kibana:/usr/share/kibana/bin/kibana。然后访问服务:kibana