Skip to content

Dinny-xu/elasticsearch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ElasticSearch 搭建

http://localhost:5601

创建索引库

PUT study
{
   "mappings": {
      "properties": {
         "content": {
            "type": "text",
            "analyzer": "ik_max_word",
            "search_analyzer": "ik_smart"
         },
         "title": {
            "type": "text",
            "analyzer": "ik_max_word",
            "search_analyzer": "ik_smart"
         },
         "createDate": {
            "type": "long"
         }
      }
   }
}
  • study : 索引库名称
  • mappings : 查询字段
  • content : 内容
  • type : 字段类型 text(文本类型)
  • analyzer参数指定索引或搜索字段时用于 文本分析的分析器。text

详细请参考官网文档

https://www.elastic.co/guide/index.html

About

ES搜索搭建

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages