Skip to content

feat(events): partial word search#446

Merged
alexsapps merged 1 commit into
mainfrom
alex/event-search
Jun 11, 2026
Merged

feat(events): partial word search#446
alexsapps merged 1 commit into
mainfrom
alex/event-search

Conversation

@alexsapps

@alexsapps alexsapps commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Improvements

    • Event search has been enhanced with improved filtering logic that now supports prefix matching, wildcard operations, and boolean search operators for more flexible and accurate query results.
  • Tests

    • Added comprehensive test coverage for event name search functionality to ensure proper parsing of search inputs, handling of boolean operators, and matching behavior across various query formats.

@alexsapps alexsapps requested a review from jakehobbs as a code owner June 11, 2026 18:56
@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 384ef530-c6fa-429e-8c63-e155fec9046d

📥 Commits

Reviewing files that changed from the base of the PR and between 565a6a5 and 1047a0f.

📒 Files selected for processing (2)
  • server/src/model/event.go
  • server/src/model/event_test.go

📝 Walkthrough

Walkthrough

The PR changes event name search in GetEvents from MySQL natural-language fulltext mode to boolean mode. A new helper eventNameBooleanQuery converts free-text input to boolean-mode syntax by stripping operators and adding wildcards. The integration applies this to the SQL query and tests verify both the transformation logic and resulting search behavior.

Changes

Event name boolean fulltext search

Layer / File(s) Summary
Event name query transformation helper
server/src/model/event.go, server/src/model/event_test.go
eventNameBooleanQuery helper sanitizes search terms by normalizing whitespace, replacing boolean operator characters with spaces, and appending trailing * wildcard to each token. TestEventNameBooleanQuery validates the transformation rules: whitespace collapsing, operator stripping, wildcard handling, and operator-only term filtering.
GetEvents boolean-mode search integration
server/src/model/event.go, server/src/model/event_test.go
EventNameQuery SQL WHERE clause updated to use MATCH ... AGAINST ... IN BOOLEAN MODE with the new helper instead of natural-language fulltext search. TestGetEvents_nameQueryPrefix verifies the integrated search returns correct results for whole-word queries, prefix queries, and hyphenated terms.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 With boolean words and wildcards bright,
Event searches now match just right!
Terms are transformed, whitespace compressed,
Hyphenated queries pass the test—
MySQL fulltext, upgraded flight!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat(events): partial word search' clearly and concisely summarizes the main change: converting event name filtering to support partial word/prefix matching via MySQL fulltext boolean mode.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch alex/event-search

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@alexsapps

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@alexsapps alexsapps merged commit 0cbd275 into main Jun 11, 2026
8 checks passed
@alexsapps alexsapps deleted the alex/event-search branch June 11, 2026 21:19
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.

1 participant