内容简介:jsearch的索引文件结构
jsearch 是一个高性能的全文检索 工具 包,基于倒排索引,基于 java 8,类似于lucene,但更轻量级。
jsearch的索引文件结构定义如下:
ID
第二部分是词频 第三部分是词的位置 4 、词的位置用 : 分割:
shingles=31=47466_1_2|1_1_6|1_1_1|2_1_5|67_1_1|903_1_3|17_1_5|1_3_4:6:11
表示词 shingles 的索引: 词:shingles
有 31 个文档包含 shingles 这个词 包含这个词的第一篇文档的 ID 是 47466 , shingles 的词频是 1 ,出现 shingles 的位置是2
文档内容为:A better solution is to use shingles, which are compound tokens created
from multiple adjacent tokens.
对文档内容进行分词并移除停用词之后的结果为: [solution, shingles, compound, tokens, created, multiple, adjacent, tokens]6
文档内容为:Lucene has a sandbox module that simplifies adding shingles to your index,
described in section 8.3.2
对文档内容进行分词并移除停用词之后的结果为: [lucene, sandbox, module, simplifies, adding, shingles, index, section]11
文档内容为:For example the sentence “please divide this sentence into shingles”
might be tokenized into the shingles “please divide”, “divide this”,
“this sentence”, “sentence into” and “into shingles”
对文档内容进行分词并移除停用词之后的结果为: [sentence, divide, sentence, shingles, tokenized, shingles, divide, divide, sentence, sentence, shingles]这里需要注意的是位置不是和原文一一对应的,而是和去除停用词后的位置一一对应的 停用词的定义看 这里的链接 , 分词使用 word分词 提供的 针对纯英文文本的分词器
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网
猜你喜欢:- MySQL 索引的原理与应用:索引类型,存储结构与锁
- 数据库索引背后的数据结构
- 深入理解 MySQL 索引底层数据结构
- 深入理解 MySQL 索引底层数据结构
- Mysql InnoDB引擎的索引和存储结构
- MySQL索引背后的数据结构及算法原理
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Hit Refresh
Satya Nadella、Greg Shaw / HarperBusiness / 2017-9-26 / USD 20.37
Hit Refresh is about individual change, about the transformation happening inside of Microsoft and the technology that will soon impact all of our lives—the arrival of the most exciting and disruptive......一起来看看 《Hit Refresh》 这本书的介绍吧!
HTML 编码/解码
HTML 编码/解码
RGB CMYK 转换工具
RGB CMYK 互转工具