Skip to content

Fix lack of title search for posts#1720

Merged
ArtOfCode- merged 5 commits intodevelopfrom
0valt/387/post-title-search
Sep 22, 2025
Merged

Fix lack of title search for posts#1720
ArtOfCode- merged 5 commits intodevelopfrom
0valt/387/post-title-search

Conversation

@Oaphi
Copy link
Member

@Oaphi Oaphi commented Aug 1, 2025

closes #387

And no, we can't just add a separate index for the title column, the way we use search we need the composite index

@codecov
Copy link

codecov bot commented Aug 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.25%. Comparing base (1633fd6) to head (3062a26).
⚠️ Report is 6 commits behind head on develop.

Additional details and impacted files
Components Coverage Δ
controllers 72.06% <ø> (ø)
helpers 82.96% <ø> (+0.52%) ⬆️
jobs 60.86% <ø> (ø)
models 89.17% <100.00%> (+0.12%) ⬆️
tasks 61.11% <ø> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@trichoplax
Copy link
Contributor

Not a suggestion, just a question to gain understanding:

And no, we can't just add a separate index for the title column, the way we use search we need the composite index

By "the way we use search" do you mean the way we implement it behind the scenes, or what we allow the user to do?

If it's just a matter of implementation, is there a benefit to having separate indexes for title and body, and returning results that match in either (the union of 2 searches)? My guess is that would mean less resources spent on storing and updating indexes, but a slightly slower search query? Is this a trade off between speed of search and speed of everything else? I don't know if either matters at present.

Copy link
Member

@ArtOfCode- ArtOfCode- left a comment

Choose a reason for hiding this comment

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

Approve with note for deployment: this is going to take forever to migrate. Don't merge yet - we'll merge just before we're ready to deploy it.

@cellio
Copy link
Member

cellio commented Aug 1, 2025

Let's do this after the deploy that we're readying now. (Reduce risk now, then do this in the next deploy.)

@Oaphi
Copy link
Member Author

Oaphi commented Aug 1, 2025

Note: there's going to be a couple more changes (should've probably set it in the draft state for now)

@Oaphi
Copy link
Member Author

Oaphi commented Aug 1, 2025

By "the way we use search" do you mean the way we implement it behind the scenes, or what we allow the user to do?

@trichoplax mostly just noting that because it was suggested to use a separate index in the previous discussion, but attempting to do so without changing how sanitize_for_search works completely will cause a "Can't find FULLTEXT index matching the column list" DB error.

We can separate the index out later when (if?) we allow to explicitly search only in title / body (like how SE does with the title: operator)

P.S. Added the "blocked" label just in case as per the deployment note

@Oaphi Oaphi added the status: blocked This is being worked on but is blocked by something else label Aug 1, 2025
@ArtOfCode- ArtOfCode- added this to the v0.13.0 milestone Aug 2, 2025
@ArtOfCode- ArtOfCode- merged commit 43bcc2e into develop Sep 22, 2025
13 checks passed
@ArtOfCode- ArtOfCode- deleted the 0valt/387/post-title-search branch September 22, 2025 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: blocked This is being worked on but is blocked by something else

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Exact search on a post title doesn't find the post

4 participants