@xlx9765
2017-06-25T14:40:08.000000Z
字数 1320
阅读 193
通过命令行进入solr-6.3.0,进行启动。提示java环境问题,于是进行修改环境变量,再次进入显示成功。成功界面如下:
根据屏幕显示信息
索引框架有:
左侧:索引条目、词频、索引字段出现次数、编码格式右侧:显示字段排名、出现频率、以及相应字段。
overview显示索引名称、记录条数、字段数目、单词总数;
documents:可向其中加入索引文件;
search:根据输入命令进行查询,如下面的name:ipod命令,下面显示返回的结果,并可对返回记录进行explain;
commits:可选择文件的种类、右侧显示各字段名称、size,以及是否被使用;
plugins:
分析结果:选中第一条搜索记录点击explain查看搜索结果,score分数为1.4344,其他结果如图显示
1.4344 weight(name:ipod in 4) [ClassicSimilarity], result of:
1.4344 fieldWeight in 4, product of:
1.4142 tf(freq=2.0), with freq of:
2.0000 termFreq=2.0
2.7047 idf(docFreq=3, docCount=21)
0.3750 fieldNorm(doc=4)。
表达式:http://localhost:8983/solr/techproducts/select?fl=name price feature&fq=manu:Belkin&indent=on&key1=val1&key2=val2&q=iPod&sort=price asc&wt=xml
结果:
http://localhost:8983/solr/techproducts/select?fl=name price features popularity&fq=popularity:[5 TO *]&indent=on&key1=val1&key2=val2&key3=val3&q=iPod&sort=inStock desc,price asc&wt=json
表达式:http://localhost:8983/solr/techproducts/select?fl=name price score&fq=price:[0 TO 400]&indent=on&key1=val1&key2=val2&key3=val3&q=iPod&sort=popularity desc&wt=json
结果: