Solr配置相关推荐

     Solr的相关推荐其实用了Lucene的MoreLikeThis,在Solr使用很简单,只需简单配置即可。

//配置如下:

   <!-- request handler  likehua -->
  <requestHandler name="/mlt" class="solr.MoreLikeThisHandler">
  </requestHandler>

请求:http://localhost:1985/solr/mlt?q=geo_name:HJ&mlt.true&mlt.fl=name&mlt.mintf=1&mlt.mindf=1

请求结果:

  <? xml version="1.0" encoding="UTF-8" ?>
- < response >
- < lst name =" responseHeader " >
  < int name =" status " > 0 </ int >
  < int name =" QTime " > 656 </ int >
  </ lst >
- < result name =" match " numFound =" 8819289 " start =" 0 " >
- < doc >
  < str name =" geo_name " > HJ1B-CCD1-26-74-L20000034219 </ str >
  < str name =" geo_summary " > GEOTIFF </ str >
  < str name =" id " > 5662528 </ str >
  </ doc >
  </ result >
  < result name =" response " numFound =" 0 " start =" 0 " />
  </ response >
参数不解释。

转载于:https://www.cnblogs.com/likehua/archive/2012/12/26/2834611.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值