倒排索引:
如果想从n个文档中查询,到“词语”是否出现,传统做法是遍历所有文档,判断是否出现。效率问题??
是ElasticSearch的一种数据结构,提高全文索引的效率。 假设文档集合包含5个文档 使用分词算法将每个文档分词 每个词维护一个倒排列表,将出现这个词的文档编号放到对应倒排列表,如果查询当前词在那个文档中,直接通过倒排列表
是ElasticSearch的一种数据结构,提高全文索引的效率。
假设文档集合包含5个文档
使用分词算法将每个文档分词
每个词维护一个倒排列表,将出现这个词的文档编号放到对应倒排列表,如果查询当前词在那个文档中,直接通过倒排列表