NOTE
1.2 Elasticsearch索引实现
1. 倒排索引是什么 - 倒排索引.md 2. Elasticsearch的倒排索引工作原理 比如两个文档 搜索Father likes cat 2.1. 建立索引 1. 首先是分词 2. 然后是normalization:就是把语态、单复数等的转换 3. 最后记录词和文档的关系 2.2. 搜索 1
这是历史学习笔记,可能存在过时或不完整的理解。
1. 倒排索引是什么
- 倒排索引.md(关联笔记尚未公开)
2. Elasticsearch的倒排索引工作原理
比如两个文档
1 Mother loves father
2 He likes dogs
搜索Father likes cat
2.1. 建立索引
- 首先是分词
Mother
loves
father
He
likes
dogs
- 然后是normalization:就是把语态、单复数等的转换
mother
love
father
he
like
dog
- 最后记录词和文档的关系
mother 1
love 1
father 1
he 2
like 2
dog 2
2.2. 搜索
- 首先是分词
Father
likes
cat
- 然后是normalization:就是把语态、单复数等的转换
father
like
cat
- 最后匹配映射关系:两个文档都会出来