1 parent 9cbe13a commit c99ce4fCopy full SHA for c99ce4f
1 file changed
backend/main.py
@@ -1532,7 +1532,6 @@ def search(
1532
# Optional: filter to only results with images
1533
if has_images:
1534
all_rows = [r for r in all_rows if '![' in (r['text'] or '')]
1535
- total = len(all_rows)
1536
rows = all_rows[offset: offset + limit]
1537
1538
# Group by subject
@@ -1579,6 +1578,7 @@ def search(
1579
1578
filter_params,
1580
has_images=has_images,
1581
)
+ total = sum(subject_counts.values())
1582
1583
# Cross-subject hint
1584
cross_subjects = [s for s in subject_counts if subject_counts[s] > 0]
0 commit comments