Release 2026.03.3#67
Merged
andrewyager merged 3 commits intomainfrom Mar 8, 2026
Merged
Conversation
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>
There was a problem hiding this comment.
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, andprint_all_filtered_labelsby passinginclude_category=Truetobuild_asset_search. - Optimize
SearchRankusage by referencing the storedsearch_vectorviaF()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.
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Commits