当前位置:网站首页>阿里架构师耗时一年整理的《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
- mosquitto_sub -F 参数使用
- Error: Protobuf syntax version should be first thing in file
- GPO: using PowerShell scripts in start/logon
- This is the right way for developers to open artifacts
- 2022cuda summer training camp Day6 practice
- What are the compensation standards for hospital misdiagnosis? How much can the hospital pay?
- ADB shell WM command and usage:
- Survival analysis using rtcga clinical data
- Two MySQL tables with different codes (utf8, utf8mb4) are joined, resulting in index failure
猜你喜欢

How to realize the function of adding watermark

美团、饿了么被杭州市监约谈要求落实食品安全管理责任 严禁恶意竞争

98. (cesium chapter) cesium point heat

mosquitto_ Sub -f parameter use

Learning R language these ebooks are enough!

基于STM32设计的酒驾报警系统

R 语言 用黎曼和求近似 积分

Vim到底可以配置得多漂亮?

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

Implementation of college logistics repair application system based on SSM
随机推荐
Introduction to distributed scheduling xxl-job features
Turn the evolutionary path of push
【论文阅读】I-BERT: Integer-only BERT Quantization
使用 RTCGA 临床数据进行生存分析
Svn revision keyword
remap_ Use of table in impdp
If distributed file storage is realized according to integrated Minio
3道软件测试面试题,能全答对的人不到10%!你会几个?
Follow teacher Wu to learn advanced numbers - function, limit and continuity (continuous update)
【日志框架】
[reading notes] the way of enterprise IT architecture transformation Alibaba's China Taiwan strategic thinking and Architecture Practice
2022cuda summer training camp Day5 practice
Achieve the effect of a menu tab
[HFCTF 2021 Final]easyflask
[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
VMware: use commands to update or upgrade VMware esxi hosts
1. (map tools) detailed tutorial of acrgis desktop10.5 software installation
Meeting OA project (V) -- meeting notice and feedback details
2022cuda summer training camp day3 practice
Drunken driving alarm system based on stm32