문제

I am going to index documents that will have Boost values from 1 to 10. One way is to simply use AddWithBoost(doc , boostvalue) . But is this the correct way? Do I need to translate the scale (1 - 10) to some other range in order to make sure that document with boost value 10 is ranked higher than one with value 9 for some query? I guess what I am looking for is the standard way of using Boost.

도움이 되었습니까?

해결책

AddWithBoost boosts documents at index-time. You can also boost fields at index-time by appending a boost value to the property attribute, e.g.:

[SolrField("thesolrfield", Boost = 20)]
public string Something { get; set; }

Take a look at this question and the Lucene similarity docs for more information on using boosts.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top