Elasticsearch基础入门

Coding Alan 4年前 (2019-12-12) 4393次浏览 0个评论 扫描二维码

准备工作

访问地址:http://127.0.0.1:9200/

Elasticsearch Head

访问http://localhost:9100/,若 Elasticsearch 处于启动状态则会自动连接

Elasticsearch基础入门

分布式集群搭建

参照以上从服务器的配置可配置多个 slave,使用中注意如果是拷贝原 master 或 slave 的文件夹的话,应删除根目录下的 data 目录

Elasticsearch基础入门

基础知识

RESTful API

  • API基本格式 http://<ip&gt;:<port>/<索引>/<类型>/<文档id>

创建索引

创建、添加和更新

可使用Postman 协助操作,也可在 Elasticsearch Head 中执行操作:

 

常见问题

1、Types cannot be provided in put mapping requests, unless the include_type_name parameter is set to true

请求的链接后添加?include_type_name=true即可

 

喜欢 (0)
[]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址