大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。
Jetbrains全系列IDE使用 1年只要46元 售后保障 童叟无欺
zz网络
首次用Luke打开索引文件。Overview里面显示了索引具有的Field数目(以最大的Field为准吧?),还有就是文档的总数和 Term即索引词的总数? 有时一个关键词,对应于多个文档,所以文档数要多于关键字数目。
还显示了索引的版本和索引的格式。 类似于Java class的格式做法,在文件头部放了对应的Lucene版本信息吧。。。
右下方的Rank是怎么算出来的?事实上我并没有做什么操作啊。。。
![luke的使用[通俗易懂]](https://javaforall.net/wp-content/uploads/2020/11/2020110817443450.jpg)
在Document视图,根据doc号,查看具体的文档项,这个功能不错。
![luke的使用[通俗易懂]](https://javaforall.net/wp-content/uploads/2020/11/2020110817443450.jpg)
通过Document标签可以查看各个Term,点击show All,会进入search页面,显示使用term查询,匹配的所有记录。 这里的term就相当于 查询关键字吧。。。
![luke的使用[通俗易懂]](https://javaforall.net/wp-content/uploads/2020/11/2020110817443450.jpg)
Luke的查询结果和直接的代码查询结果是一致的。。。
这个功能赞的。通过luke就可以直接研究索引文件里面的内容了。。。。。
![luke的使用[通俗易懂]](https://javaforall.net/wp-content/uploads/2020/11/2020110817443450.jpg)
在查询标签,选择分词器。。。。点击查询就可以查了。。。 这里选择的是CJK分词器,针对东亚文字的分析器。。。
![luke的使用[通俗易懂]](https://javaforall.net/wp-content/uploads/2020/11/2020110817443450.jpg)
使用同一个数据源,现在搜到的东西是一样了,呵呵…
![luke的使用[通俗易懂]](https://javaforall.net/wp-content/uploads/2020/11/2020110817443450.jpg)
在Search标签页里,点击Explain structure,可以看到对查询字符串的分词结果。。。.
(在查询输入框)更新查询字符串之后,需要点击update,才会更新下面的字符。。。
![luke的使用[通俗易懂]](https://javaforall.net/wp-content/uploads/2020/11/2020110817443450.jpg)
Term对应的各个文档,这里相当于是遍历列表?从头到尾的遍历?也可以show all,这会跳转到Search标签。。也可以点击Show Position显示文档的位置信息。 这里的term frequency是指 term在文档中的出现次数。只有Show all,才会触发Search,并跳转到Search标签。
如下操作序列挺有意思的。 首先点击Next term,转到下一个Term,再点击First Doc,显示该Term的第一个Document。
![luke的使用[通俗易懂]](https://javaforall.net/wp-content/uploads/2020/11/2020110817443450.jpg)
同个Term对应的文档也是排序的? 这里根据Document之后的数字排列了,至少从截图上看起来是这样的。
![luke的使用[通俗易懂]](https://javaforall.net/wp-content/uploads/2020/11/2020110817443450.jpg)
Tool菜单栏里有个Check Index选项:
如下是我对当前操作索引的check操作。。。
Segments file=segments_2 numSegments=1 version=FORMAT_HAS_PROX [Lucene 2.4]
1 of 1: name=_0 docCount=153090
compound=true
hasProx=true
numFiles=1
size (MB)=17.396
no deletions
test: open reader………OK
test: fields, norms…….OK [2 fields]
test: terms, freq, prox…OK [88735 terms; 559179 terms/docs pairs; 563003 tokens]
test: stored fields…….OK [306180 total field count; avg 2 fields per doc]
test: term vectors……..OK [0 total vector count; avg 0 term/freq vector fields per doc]
No problems were detected with this index.
OverView里面的show top terms,显示的是 对应document数目最多的term。。。
可以通过Luke查看文档评分机制的。。。
numDocs是文档总数,docFreq是匹配这个term的文档总数。 idf是定义在这两个量之上的吧。。。。
queryNorm和fieldNorm是怎么算出来的?
![luke的使用[通俗易懂]](https://javaforall.net/wp-content/uploads/2020/11/2020110817443450.jpg)
打开索引时,选择载入内存,速度会快很多。。。
![luke的使用[通俗易懂]](https://javaforall.net/wp-content/uploads/2020/11/2020110817443450.jpg)
发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/166985.html原文链接:https://javaforall.net
