File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -268,6 +268,11 @@ public ValueTask<bool> ExecuteAsync(ActionContext context)
268268 /// </summary>
269269 public bool AddSelectedCount { get ; set ; } = true ;
270270
271+ /// <summary>
272+ /// Maximum score. This can be useful when set one result to the top by default. This is the score for the results set to the topmost by users.
273+ /// </summary>
274+ public const int MaxScore = int . MaxValue ;
275+
271276 /// <summary>
272277 /// Info of the preview section of a <see cref="Result"/>
273278 /// </summary>
Original file line number Diff line number Diff line change @@ -1471,9 +1471,9 @@ public void UpdateResultView(ICollection<ResultsForUpdate> resultsForUpdates)
14711471 {
14721472 if ( _topMostRecord . IsTopMost ( result ) )
14731473 {
1474- result . Score = int . MaxValue ;
1474+ result . Score = Result . MaxScore ;
14751475 }
1476- else if ( result . Score != int . MaxValue )
1476+ else if ( result . Score != Result . MaxScore )
14771477 {
14781478 var priorityScore = metaResults . Metadata . Priority * 150 ;
14791479 result . Score += result . AddSelectedCount ?
You can’t perform that action at this time.
0 commit comments