开发者

Boosting fields at query time in Standard Request Handler from Solrconfig.xml

I am developing a search engine app using Asp.Net, C# and Solrnet. I use the standard request handler. Is there a way I can boost the fields at query time from inside the solrconfig.xml file itself. Just like the "qf" field for Dismax handler.

Right now am searching like "field1:value^1.5 field2:value^1.2 field3:value^0.8" and this is done in the middle tier. I want Solr itself to do this using standard request handler. Can I write a similar kind of thing inside standard req handler?

Here is my solrconfig file.

<requestHandler name="standard" class="solr.SearchHandler" default="true">
   <lst name="defaults">
     <str name="echoParams">explicit</str>
     <str name="hl">true</str>
     <str name="hl.snippets">3</str>
     <str name="hl.fragsize">25</str>
     <str name="qf">file_description^100.0 file_c开发者_运维问答ontent^6.0 file_name^10.0 file_comments^4.0
     </str>
   </lst>
   <arr name="last-components">
      <str>spellcheck</str>             
   </arr>
 </requestHandler>

Regards

Vignesh


Inside a 'requestHandler' element in solrconfig.xml you can add

<requestHandler>
   <str name="qf">
       field1^3.0 field2^2.0 field3^1.0
   </str>
</requestHandler>

to provide a predefined field bias, I hope I have understood your question right? :-)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜