【发布时间】:2015-05-10 13:11:27
【问题描述】:
我正在尝试了解 Solr MorelIkeThis 的工作原理。我已经完成的步骤 -
- 在 schema.xml 我已经写了 -
field name="path_exact" type="string" indexed="true" stored="true" termVectors="true"/>
field name="title" type="text_general" indexed="true" stored="true" multiValued="true" termVectors="true"/>
-
提到的唯一键
path_exact
-
使用以下命令在 solr 中创建索引 -
{"path_exact":"id1","title":"x1"}
{"path_exact":"id2","title":"x12"}
-
现在,当我尝试点击以下网址时,它会返回结果,但我无法理解这到底是什么意思? id1 和 id2 是否找不到更多类似的商品?如果是,那么我在这里缺少什么?
http://:/solr/collection2/select?q=x1*&mlt=true&mlt.fl=title&wt=xml
结果 -
<lst name="moreLikeThis">
<result name="id1" numFound="0" start="0"/>
<result name="id2" numFound="0" start="0"/>
感谢您的帮助!
【问题讨论】:
标签: solr lucene solrj morelikethis