Skip to content

Latest commit

 

History

History
28 lines (20 loc) · 470 Bytes

7_倒排索引.md

File metadata and controls

28 lines (20 loc) · 470 Bytes

倒排索引

倒排索引((Inverted Index))是一种索引方法,被用来存储在全文搜索下某个单词在一个文档或者一 组文档中的存储位置的映射

以英文为例,下面是要被索引的文本 T0、T1、T2:

T0 = "it is what it is"
T1 = "what is it"
T2 = "it is a banana"

得到反向文件索引:

"a": {2}
"banana": {2}
"is": {0, 1, 2}
"it": {0, 1, 2}
"what": {0, 1}