当前位置:网站首页>阿里架构师耗时一年整理的《Lucene高级文档》,吃透你也是大厂员工!
阿里架构师耗时一年整理的《Lucene高级文档》,吃透你也是大厂员工!
2022-07-29 10:40:00 【InfoQ】


一、搜索技术理论基础
- 为什么要学Lucene
- 数据查询方法
- 全文检索技术应用场景

二、Lucene介绍
- 什么是全文检索
- 什么是Lucene
- Lucene官网

三、Lucene全文检索的流程
- 索引和搜索流程图
- 索引流程
- 搜索流程

四、Lucene入门
- Lucene准备
- 开发环境
- 创建Java工程
- 索引流程
- 使用Luke查看索引
- 搜索流程

五、Field域类型
- Field属性
- Field常用类型
- Field修改

六、索引维护
- 需求
- 添加索引
- 修改索引
- 删除索引

七、分词器
- 分词理解
- Analyzer使用时机
- Lucene原生分词器
- 第三方中文分词器

八、Lucene高级搜索
- 文本搜索
- 數值范围搜索
- 組合搜索

九、搜索案例
- 引入依赖
- 项目加入页面和资源
- 创建包和启动类
- 配置文件
- 业务代码

十、Lucene底层储存结构(高级)
- 详细理解lucene存储结构
- 索引库物理文件
- 索引库文件扩展名对照表
- 词典的构建

十一、Lucene优化(高级)
- confifig.setMaxBufffferedDocs(100000); 控制写入一个新的segment前内存中保存的document的数目,设置较大的数目可以加快建索引速度。(数值越大索引速度越快, 但是会消耗更多的内存)
- indexWriter.forceMerge(文档数量); 设置N个文档合并为一个段(数值越大索引速度越快, 搜索速度越慢; 值越小索引速度越慢, 搜索速度越快)
- 解决大量磁盘IO
- 选择合适的分词器
- 选择合适的位置存放索引库
- 搜索api的选择

十二、Lucene相关度排序(高级)

十三、Lucene使用注意事项(高级)
- 关键词区分大小写 OR AND TO等关键词是区分大小写的,lucene只认大写的,小写的当做普通单词。
- 读写互斥性 同一时刻只能有一个对索引的写操作,在写的同时可以进行搜索
- 文件锁 在写索引的过程中强行退出将在tmp目录留下一个lock文件,使以后的写操作无法进行,可以将其手工删除
- 时间格式 lucene只支持一种时间格式yyMMddHHmmss,所以你传一个yy-MM-dd HH:mm:ss的时间给lucene它是不会当作时间来处理的
- 设置boost 有些时候在搜索时某个字段的权重需要大一些,例如你可能认为标题中出现关键词的文章比正文中出现关键词的文章更有价值,你可以把标题的boost设置的更大,那么搜索结果会优先显示标题中出现关键词的文章

边栏推荐
- Use tidymodels to solve the binary logistic model
- Big cloud service company executives changed: technology gives way to sales
- Data visualization design guide (information chart)
- R package pedquant realizes stock download and financial quantitative analysis
- Drunken driving alarm system based on stm32
- Kunlunbase instruction manual (III) data import & synchronization
- How to realize the function of adding watermark
- R language uses data set veteran for survival analysis
- A tour of grp:04 - GRP unary call unary call
- ADDS:使用 PowerShell 创建 OU 结构
猜你喜欢
![[Yugong series] go teaching course 010 in July 2022 - Boolean and character types of data types](/img/3c/eaadcc105377f012db5ee8852b5e28.png)
[Yugong series] go teaching course 010 in July 2022 - Boolean and character types of data types

NUMA architecture CPU API change summary

【论文阅读】Q-BERT: Hessian Based Ultra Low Precision Quantization of BERT

站点数据收集-Scrapy使用笔记

Tell you from my accident: Mastering asynchrony is key

Follow teacher Tian to learn practical English Grammar (continuous update)

How to realize the function of adding watermark

Leetcode binary tree series -- 144. Preorder traversal of binary trees

Summer 2022 software innovation laboratory training JDBC

Oracle advanced (XIV) explanation of escape characters
随机推荐
使用tidymodels搞定二分类logistic模型
The server
Use R-Pack skimr to collect the beautiful display of President measurement
Kunlunbase instruction manual (IV) real time synchronization of data from Oracle to kunlunbase
Consumer electronics, frozen to death in summer
[dark horse morning post] Youxian responded to the dissolution every day, and many places have been unable to place orders; Li Bin said that Wei Lai will produce a mobile phone every year; Li Ka Shing
主子仓库都修改,如何进行同步?
PAHO cross compilation
Create PHP message board system with kubernetes
Luogu p1816 loyalty solution
Less than 10% of the 3 software test interview questions can be answered correctly! How many do you know?
[IVI] 17.1 debugging pit FAQ (compilation)
使用R包skimr汇总统计量的优美展示
Understand what a binary tree is (types, traversal methods, definitions of binary trees)
[HFCTF 2021 Final]easyflask
NUMA architecture CPU API change summary
If distributed file storage is realized according to integrated Minio
ADB shell WM command and usage:
【论文阅读】I-BERT: Integer-only BERT Quantization
Scrape crawler framework