您的位置:首页 > 其它

elasticsearch的索引的创建的原理

2018-10-19 17:18 232 查看

elascticsearch索引创建的过程和原理

1.需要一些源文档
① Students should be allowed to go out with their friends, but not allowed to drink beer.
② My friend Jerry went to school to see his students but found them drunk which is not allowed.

2,利用分词组件去得到词元

对于一些挺词,也就是普通的词 ,大多情况 不能作为关键词,因此分词组件会进行筛选
所以,对于上面的两个源文档我们得到词元信息为
“Students”,“allowed”,“go”,“their”,“friends”,“allowed”,“drink”,“beer”,“My”,“friend”,“Jerry”,“went”,“school”,“see”,“his”,“students”,“found”,“them”,“drunk” ,“allowed”

3.将得到的词元传给语言处理组件(Linguistic Processor)
对于英语

  1. 变为小写(Lowercase)。
  2. 将单词缩减为词根形式,如“cars”到“car”等。这种操作称为:stemming。
  3. 将单词转变为词根形式,如“drove”到“drive”等。这种操作称为:lemmatization。
    将上面的词元处理后的结果称之为词

4,将词传给索引组件Indexer创建词典



阅读更多
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: