倒排索引(Inverted Index)
倒排索引(Inverted Index)
倒排索引是一种索引结构,它存储了单词与单词自身在一个或多个文档中所在位置之间的映射。
倒排索引通常利用关联数组实现。它拥有两种表现形式:
inverted file index,其表现形式为 {词项,词项所在文档的ID}
full inverted index,其表现形式为 {词项,(词项所在文档的ID,在具体文档中的位置)}
具体实例,假设有三个文档:
D0 = "it is what it is"
D1 = "what is it"
D2 = "it is a banana"
那么,采用inverted file index方式,结果是:
"a": {2}
"banana": {2}
"is": {0, 1, 2}
"it": {0, 1, 2}
"what": {0, 1}
采用full inverted index方式,结果是:
"a": {(2, 2)}
"banana": {(2, 3)}
"is": {(0, 1), (0, 4), (1, 1), (2, 1)}
"it": {(0, 0), (0, 3), (1, 2), (2, 0)}
"what": {(0, 2), (1, 0)}
倒排索引(Inverted Index)的更多相关文章
- 正排索引(forward index)与倒排索引(inverted index)
正常的索引一般是指关系型数据库里的索引. 把不同的数据存放到不同的字段中.如果要实现baidu或google那种搜索,就需要与一条记录的多个字段进行比对,需要 全表扫描,如果数据量比较大的话,性能就很 ...
- 正排索引(forward index)与倒排索引(inverted index) (转)
一.正排索引(前向索引) 正排索引也称为"前向索引".它是创建倒排索引的基础,具有以下字段. (1)LocalId字段(表中简称"Lid"):表示一个文档的局部 ...
- [IR] Inverted Index & Boolean retrieval
教材:<信息检索导论> 倒排索引 How to build Inverted Index? 1. Token sequence. 2. Sort by terms. 3. Dictiona ...
- [Search Engine] Compression in Inverted Index
最近在学一些搜索引擎的内容,感觉挺费劲,所以就用博客当做自己的笔记,遇到一些需要整理的部分,就在这里整理一下. 今天的内容是对inverted index进行压缩.核心思想,用我自己的话来总结,就是“ ...
- Fielddata is disabled on text fields by default. Set fielddata=true on [gender] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memor
ES进行如下聚合操作时,会报如题所示错误: ➜ Downloads curl -XPOST 'localhost:9200/bank/_search?pretty' -d ' { "size ...
- 反向索引(Inverted Index)
转自:http://zhangyu8374.iteye.com/blog/86307 反向索引是一种索引结构,它存储了单词与单词自身在一个或多个文档中所在位置之间的映射.反向索引通常利用关联数组实现. ...
- Elasticsearch 报错:Fielddata is disabled on text fields by default. Set `fielddata=true` on [`your_field_name`] in order to load fielddata in memory by uninverting the inverted index.
Elasticsearch 报错: Fielddata is disabled on text fields by default. Set `fielddata=true` on [`your_fi ...
- Elasticsearch:inverted index,doc_values及source
以后会用到的相关知识:索引中某些字段禁止搜索,排序等操作 当我们学习Elasticsearch时,经常会遇到如下的几个概念: Reverted index doc_values source? 这个几 ...
- 504. Inverted Index (Map Reduce) lintcode
https://www.lintcode.com/problem/inverted-index-map-reduce/description -- decription of the map redu ...
随机推荐
- Python常用库之functools
functools 是python2.5被引人的,一些工具函数放在此包里. python2.7中 python3.6中 import functools print(dir(functools)) [ ...
- Matplotlib 知识点整理
本文作为学习过程中对matplotlib一些常用知识点的整理,方便查找. 强烈推荐ipython 无论你工作在什么项目上,IPython都是值得推荐的.利用ipython --pylab,可以进入Py ...
- Git学习笔记---协作的一般流程
一般的操作流程 1.pull 王小坤与另一个同事张大炮一起开发一个项目,张大炮昨天修改了数据库读写的api,优化了执行速度,并把read()函数改名成了Read(),下午下班之前把这些代码push到服 ...
- dajie项目的坑
1.首先IDEA巨坑无比的地方是引入时,只要哪怕一个依赖下载不到,就会长期阻塞,删除.重新引入都没用!! 2.注释掉项目及其子项目中所有pom.xml中引用的spring仓库,否则即使maven配置阿 ...
- 论文笔记之 SST: Single-Stream Temporal Action Proposals
SST: Single-Stream Temporal Action Proposals 2017-06-11 14:28:00 本文提出一种 时间维度上的 proposal 方法,进行行为的识别.本 ...
- JQuery---高级类选择器
1.ContentFilters 1.1 语法:$('div:contains(edu)').css('backgroundColor','yellow'); 只看div 本身是否包含内容 1.2 语 ...
- Jenkins-pipeline
https://my.oschina.net/ghm7753/blog/371954?p=1
- C+++string类如何判断字符串为空
string类是C++STL类之一,有很丰富的接口,判断string为空是经常用到的操作. string类为空,实际也就是元素为0个. 可以按照如下方式判断: 1.string类有自己的成员函数emp ...
- Antd-Select组件的深入用法
一.Antd-Select提供几种类型 最基础版只提供下拉功能的选择器 带搜索功能的下拉选择器 可多选的下拉选择器 可搜索.可多选.可随意输入内容的tag下拉选择器(支持自动分词) 多级联动下拉选择器 ...
- 理解 Redis(3) - 字符串值
正如前面所讲的, redis 的数据结构就是一系列的键值对键 -> printable ASCII (可打印的 ASCII 码, 最大值是 512MB)值 -> Primitives (基 ...