索引原理
倒排索引
倒排索引(Inverted Index)也叫反向索引,有反向索引必有正向索引。通俗地来讲,正向索引是通过key找value,反向索引则是通过value找key。ES底层在检索时底层使用的就是倒排索引。
索引模型
现有索引和映射如下:
{
"products" : {
"mappings" : {
"properties" : {
"description" : {
"type" : "text"
},
"price" : {
"type" : "float"
},
"title" : {
"type" : "keyword"
}
}
}
}
}
先录入如下数据,有三个字段title、price、description等
| _id | title | price | description |
|---|---|---|---|
| 1 | 蓝月亮洗衣液 | 19.9 |
蓝月亮洗衣液很高效 |
| 2 | iphone13 |
1687



被折叠的 条评论
为什么被折叠?



