diff --git a/scene_search/web/index.html b/scene_search/web/index.html
index 023fb8a..71bead0 100644
--- a/scene_search/web/index.html
+++ b/scene_search/web/index.html
@@ -603,7 +603,8 @@
const el = document.createElement('article');
el.className = 'result';
- const details = matches.map(scene => {
+ const otherMatches = matches.slice(1);
+ const details = otherMatches.map(scene => {
const score = scene.ranking_score == null
? (scene.siglip_score == null ? '—' : Number(scene.siglip_score).toFixed(3))
: Number(scene.ranking_score).toFixed(3);
@@ -613,7 +614,7 @@
}).join('');
const moreText = totalMatches > shownMatches
- ? ' · showing top ' + shownMatches
+ ? ' · ' + totalMatches + ' total hits, showing top ' + shownMatches
: '';
el.innerHTML =
@@ -628,8 +629,9 @@
? (best.siglip_score == null ? '—' : Number(best.siglip_score).toFixed(3))
: Number(best.ranking_score).toFixed(3)) +
'' +
- (matches.length > 1
- ? 'View matching scenes' +
+ (otherMatches.length
+ ? 'View ' + otherMatches.length +
+ ' other matching scene' + (otherMatches.length === 1 ? '' : 's') +
moreText + '
' + details + ' '
: '') +
'';