ElasticSearch学习笔记(一)-- 查询索引分词

# 查看所有索引
GET _cat/indices

# 创建一个索引
PUT /test_index
# 插入一条数据(指定id)
PUT /test_index/doc/1 { "username":"张三", "age":18 }
# 插入一条数据(不指定id)
POST /test_index/doc
{
  "username":"李四",
  "age":20
}
# 查询一个
GET /test_index/doc/1

# 查询所有
GET /test_index/doc/_search
# 条件查询所有
GET /test_index/doc/_search
{
  "query": {
    "term": {
      "id": 1
    }
  }
}

1. 批量写入api

2. 批量查询api

 3. 正排索引与倒排索引

4. 分词器介绍

 

5. 自带分词器

 

6. 中文分词

7. 自定义分词之CharacterFilter

8. 自定义分词之Tokenizer

9. 自定义分词之 TokenFilter

10. 自定义分词

原文地址:https://www.cnblogs.com/tangzhe/p/9583455.html