倒排索引(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)的更多相关文章

  1. 正排索引(forward index)与倒排索引(inverted index)

    正常的索引一般是指关系型数据库里的索引. 把不同的数据存放到不同的字段中.如果要实现baidu或google那种搜索,就需要与一条记录的多个字段进行比对,需要 全表扫描,如果数据量比较大的话,性能就很 ...

  2. 正排索引(forward index)与倒排索引(inverted index) (转)

    一.正排索引(前向索引) 正排索引也称为"前向索引".它是创建倒排索引的基础,具有以下字段. (1)LocalId字段(表中简称"Lid"):表示一个文档的局部 ...

  3. [IR] Inverted Index & Boolean retrieval

    教材:<信息检索导论> 倒排索引 How to build Inverted Index? 1. Token sequence. 2. Sort by terms. 3. Dictiona ...

  4. [Search Engine] Compression in Inverted Index

    最近在学一些搜索引擎的内容,感觉挺费劲,所以就用博客当做自己的笔记,遇到一些需要整理的部分,就在这里整理一下. 今天的内容是对inverted index进行压缩.核心思想,用我自己的话来总结,就是“ ...

  5. 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 ...

  6. 反向索引(Inverted Index)

    转自:http://zhangyu8374.iteye.com/blog/86307 反向索引是一种索引结构,它存储了单词与单词自身在一个或多个文档中所在位置之间的映射.反向索引通常利用关联数组实现. ...

  7. 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 ...

  8. Elasticsearch:inverted index,doc_values及source

    以后会用到的相关知识:索引中某些字段禁止搜索,排序等操作 当我们学习Elasticsearch时,经常会遇到如下的几个概念: Reverted index doc_values source? 这个几 ...

  9. 504. Inverted Index (Map Reduce) lintcode

    https://www.lintcode.com/problem/inverted-index-map-reduce/description -- decription of the map redu ...

随机推荐

  1. Django 创建项目笔记

    基本命令 mkdir mysite # 创建项目目录,常取名mysite cd mysite virtualenv env # env\Scripts\activate.bat # Win pip i ...

  2. bitset,2018蓝桥杯-明码(二进制转换)

    bitset可以存储二进制数位 bitset<8> x(2); cout<<x<<endl; //输出:00000010 #include <iostream ...

  3. HDU 3506 Monkey Party(区间DP)题解

    题意:有n个石堆排成环,每次能合并相邻的两堆石头变成新石堆,代价为新石堆石子数,问最少的总代价是多少 思路:先看没排成环之前怎么做:用dp[i][j]表示合并i到j所需的最小代价,那么dp[i][j] ...

  4. nginx重新编译添加ssl模块

    https://www.cnblogs.com/zhming26/p/6278667.html https nginx配置 找到安装nginx的源码根目录,如果没有的话下载新的源码 http://ng ...

  5. Js批量下载花瓣网及堆糖网专辑图片

    插件作者:SaintIC 文章地址:https://blog.saintic.com/blog/256.html 一.安装 1. 安装Tampermonkey扩展,不同浏览器的支持,参见官网:http ...

  6. 【使用指南】WijmoJS 前端开发工具包

    为方便广大前端开发人员更好的使用 WijmoJS 前端开发工具包,葡萄城专门推出了 WijmoJS 使用指南,该指南详细地介绍了如何把 WijmoJS 各种强大的功能应用到您自己的 Web 项目中,助 ...

  7. Qt实在太漂亮了

    我很久之前就想用Qt,无奈对c++不熟悉,学习代价太大.想使用pyqt曲线救国,搞了好久的环境后放弃了.昨天又看了个很漂亮的qt例子,太漂亮了,让我很想进圈子.就从现在开始吧!!

  8. js作用域题目

    window.number = 4var obj = { 'number': 4, 'tbl': (function(){ this.number *= 2; console.log(this.num ...

  9. Idea中配置Tomcat

    配置步骤 在idea项目左上角选择‘Edit Configurations’ 2. 配置server 3. 配置项目 4. 配置成功后就可以在项目下面看到tomcat了 运行Tomcat遇到权限问题: ...

  10. Android CPU耗电量测试

    Android CPU耗电量测试 在测试Android app时,不仅仅要关注app的功能,也好关注app的性能指标,cpu.内存.流量.电量等.简单介绍下电量测试中的cpu耗电. 影响耗电的因素 C ...