随笔分类 - elasticsearch
摘要:实战 爬虫 爬取数据:获取请求返回的页面信息,筛选出我们想要的数据 java中jsoup包 只能爬取网页,爬取电影,音乐用tika包 <dependency> <groupId>org.jsoup</groupId> <artifactId>jsoup</artifactId> <version>1
阅读全文
摘要:springboot 依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-elasticsearch</artifactId> </dependency> s
阅读全文
摘要:ik分词器 中国人默认会吧拆分成中,国,人,显然这不是我们想要的,所以要用中文分词器,ik ik分词器提供了两个分词算法:id_mart和ik_max_word,其中ik_smart为最粗粒度拆分,ik_max_word为最细粒度拆分 下载:https://github.com/medcl/elas
阅读全文
摘要:索引操作 1.创建索引 PUT /test1/_doc/2 { "name": "桃子", "age": 18 } GET test1 #可以看到有默认类型 2.指定类型,就像sql创建表 PUT /test2 { "mappings": { "properties": { "name": { "t
阅读全文
摘要:ES核心概念 elasticsearch是面向文档的。和关系型数据库对比 Realational DB (mysql) ES 数据库(database) 索引(indeces) 表(tables) 类型(types) 8.x之后慢慢废弃 行(rows) 文档(doucuments) 列(column
阅读全文
摘要:ES安装 下载:https://www.elastic.co/cn/downloads/elasticsearch#ga-release 官方文档:https://www.elastic.co/guide/en/elasticsearch/reference/7.6/getting-started.
阅读全文