Skip to content

Release 2026.03.3#67

Merged
andrewyager merged 3 commits intomainfrom
develop
Mar 8, 2026
Merged

Release 2026.03.3#67
andrewyager merged 3 commits intomainfrom
develop

Conversation

@andrewyager
Copy link
Copy Markdown
Member

Summary

  • Search improvements: Expanded asset text search to include category names, improving discoverability of assets by category
  • Performance optimization: Optimized SearchRank calculation to avoid redundant tsvector parsing, improving search query performance

Commits

  • 1696c14 fix: include category name in asset list and export text search
  • 73180ef fix: use F() reference for SearchRank to avoid tsvector re-parse

andrewyager and others added 2 commits March 8, 2026 20:12
SearchRank("search_vector", ...) was generating
ts_rank(to_tsvector(COALESCE(search_vector::text, '')), ...)
which defeats the GIN index. F("search_vector") generates the
correct ts_rank("assets_asset"."search_vector", ...).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Asset list, export, and print-all-filtered views were calling
build_asset_search with include_category=False (default), so
searching for a category name like "religious" only matched tags,
not assets belonging to that category.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Expands the asset text search behavior used by list/export/label-print flows to include category names, and optimizes PostgreSQL full-text search ranking to avoid re-parsing the stored tsvector.

Changes:

  • Enable category-name matching in asset_list, export_assets, and print_all_filtered_labels by passing include_category=True to build_asset_search.
  • Optimize SearchRank usage by referencing the stored search_vector via F() to avoid redundant parsing.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/assets/views.py Turns on category-name search for list/export/label-print query flows.
src/assets/services/search.py Uses F("search_vector") in SearchRank to avoid extra work when ranking.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/assets/views.py
Comment thread src/assets/views.py Outdated
Comment thread src/assets/views.py
…tests

Address Copilot review: apply .strip()[:200] to q parameter in
print_all_filtered_labels for consistency with other views. Add
view-level tests for text search by category name in asset list
and export views.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@andrewyager andrewyager merged commit 9725d47 into main Mar 8, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants