Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: don't let null values in title or keywords break free-text search #345

Merged
merged 2 commits into from
Feb 10, 2025

Conversation

hrodmn
Copy link
Collaborator

@hrodmn hrodmn commented Feb 4, 2025

The free-text search feature for collections does not work when either title or keywords are null in the collections table. By adding the coalesce(content->'properties'->>'{field}', '') the tsquery` comparison will work even if those fields aren't set.

resolves #344

Problem with incremental migration test

When I run scripts/test --migrations the test that searches for a collection with a null title fails (it returns an empty list instead of the collection that it should find). This test passes in a database that is spun up from scratch, though. 🤔

Update: fixed with a small tweak in the stageversion script

@hrodmn hrodmn requested a review from bitner February 4, 2025 18:54
@bitner bitner merged commit 38e14a0 into main Feb 10, 2025
4 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.

collection free-text search fails when optional fields are null
2 participants