File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -268,6 +268,11 @@ public ValueTask<bool> ExecuteAsync(ActionContext context)
268
268
/// </summary>
269
269
public bool AddSelectedCount { get ; set ; } = true ;
270
270
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
+
271
276
/// <summary>
272
277
/// Info of the preview section of a <see cref="Result"/>
273
278
/// </summary>
Original file line number Diff line number Diff line change @@ -1471,9 +1471,9 @@ public void UpdateResultView(ICollection<ResultsForUpdate> resultsForUpdates)
1471
1471
{
1472
1472
if ( _topMostRecord . IsTopMost ( result ) )
1473
1473
{
1474
- result . Score = int . MaxValue ;
1474
+ result . Score = Result . MaxScore ;
1475
1475
}
1476
- else if ( result . Score != int . MaxValue )
1476
+ else if ( result . Score != Result . MaxScore )
1477
1477
{
1478
1478
var priorityScore = metaResults . Metadata . Priority * 150 ;
1479
1479
result . Score += result . AddSelectedCount ?
You can’t perform that action at this time.
0 commit comments