admin管理员组

文章数量:1663789

搜索引擎Elasticsearch+es-mysql同步+ik分词

Elasticsearch

Elasticsearch是一个搜索引擎,我个人认为可以理解为是数据库,如下图:
普通数据库 搜索引擎Elasticsearch
数据库 索引index
类型type
文档document

常用操作

  1. PUT:创建索引

    http://localhost:9200/索引名

    注意:索引名不能出现大写

  2. POST:增加文档

    http://localhost:9200/索引名/类型名
    {
    文档… 例如:
    “title”:“mytitle”,
    “content”:“mycontent…”
    }


POST请求成功的 created为true
PUT请求成功的 created为false

  1. 查看文档:GET

本文标签: 分词搜索引擎Elasticsearchesmysql