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

Include image alt text in post search #5449

Merged
merged 5 commits into from
Feb 25, 2025
Merged

Conversation

DraconicNEO
Copy link
Contributor

@DraconicNEO DraconicNEO commented Feb 23, 2025

Pull request to include Image Alt-text in Post search results. Allowing Posts to be searched for by their image alt-text.

Fixes #5445

Added Alt-text filter to search
@DraconicNEO DraconicNEO changed the title nclude image alt text in post search Include image alt text in post search Feb 23, 2025
Add the call to actually use the alt-text filter I added.
Copy link
Collaborator

@dullbananas dullbananas left a comment

Choose a reason for hiding this comment

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

Add this migration

down.sql

DROP INDEX idx_post_trigram;

CREATE INDEX IF NOT EXISTS idx_post_trigram ON post USING gin (name gin_trgm_ops, body gin_trgm_ops);

up.sql

DROP INDEX idx_post_trigram;

CREATE INDEX IF NOT EXISTS idx_post_trigram ON post USING gin (name gin_trgm_ops, body gin_trgm_ops, alt_text gin_trgm_ops);

@DraconicNEO
Copy link
Contributor Author

Add this migration

down.sql

DROP INDEX idx_post_trigram;

CREATE INDEX IF NOT EXISTS idx_post_trigram ON post USING gin (name gin_trgm_ops, body gin_trgm_ops);

up.sql

DROP INDEX idx_post_trigram;

CREATE INDEX IF NOT EXISTS idx_post_trigram ON post USING gin (name gin_trgm_ops, body gin_trgm_ops, alt_text gin_trgm_ops);

Done

Copy link
Member

@dessalines dessalines left a comment

Choose a reason for hiding this comment

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

Thx!

@dessalines dessalines enabled auto-merge (squash) February 24, 2025 17:12
@dessalines
Copy link
Member

In the future use Fixes #ISSUE_NUM in either the PR or a commit to get github to close it automatically. I edited the PR text to do this.

@dessalines dessalines merged commit 1a299ba into LemmyNet:main Feb 25, 2025
1 check 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.

Include image alt text in post search
5 participants