mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-17 10:13:56 -05:00
only show score when sorting by score
This commit is contained in:
parent
0d5fd229bf
commit
f3703fc6e3
@ -83,7 +83,7 @@
|
|||||||
<small>{{document.created | customDate:'mediumDate'}}</small>
|
<small>{{document.created | customDate:'mediumDate'}}</small>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="document.__search_hit__" class="list-group-item bg-light text-dark border-0 d-flex p-0 pl-4 search-score">
|
<div *ngIf="document.__search_hit__?.score" class="list-group-item bg-light text-dark border-0 d-flex p-0 pl-4 search-score">
|
||||||
<small class="text-muted" i18n>Score:</small>
|
<small class="text-muted" i18n>Score:</small>
|
||||||
<ngb-progressbar [type]="searchScoreClass" [value]="document.__search_hit__.score" class="search-score-bar mx-2 mt-1" [max]="1"></ngb-progressbar>
|
<ngb-progressbar [type]="searchScoreClass" [value]="document.__search_hit__.score" class="search-score-bar mx-2 mt-1" [max]="1"></ngb-progressbar>
|
||||||
</div>
|
</div>
|
||||||
|
@ -246,11 +246,13 @@ class DelayedQuery:
|
|||||||
sortedby is None):
|
sortedby is None):
|
||||||
self.first_score = page.results[0].score
|
self.first_score = page.results[0].score
|
||||||
|
|
||||||
if self.first_score:
|
page.results.top_n = list(map(
|
||||||
page.results.top_n = list(map(
|
lambda hit: (
|
||||||
lambda hit: (hit[0] / self.first_score, hit[1]),
|
(hit[0] / self.first_score) if self.first_score else None,
|
||||||
page.results.top_n
|
hit[1]
|
||||||
))
|
),
|
||||||
|
page.results.top_n
|
||||||
|
))
|
||||||
|
|
||||||
self.saved_results[item.start] = page
|
self.saved_results[item.start] = page
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user