开发者

SolrNet queries with boost functions

开发者 https://www.devze.com 2022-12-08 11:12 出处:网络
I\'m trying to use this library (which looks very ni开发者_高级运维ce) but I\'m having difficulty understanding how to add extra params to my queries such as boost functions etc. How can this be done?

I'm trying to use this library (which looks very ni开发者_高级运维ce) but I'm having difficulty understanding how to add extra params to my queries such as boost functions etc. How can this be done?


You can use the ExtraParams property of QueryOptions to add any parameter to the Solr querystring. Example:

ISolrOperations<Document> solr = ...
var results = solr.Query("myquery", new QueryOptions {
  ExtraParams = new Dictionary<string, string> {
    {"bf", "recip(rord(myfield),1,2,3)^1.5"}
  }
});
0

精彩评论

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