-
Notifications
You must be signed in to change notification settings - Fork 44
feat: full text search #217
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces full-text search for email messages using a Redisearch index, integrating indexing into the email lifecycle and adding a search endpoint with UI components.
- Implemented
EmailSearch
class for building, indexing, and querying a Redisearch index. - Hooked index creation, document addition, update, and deletion into email message events.
- Exposed a
search_mails
API and added a search modal plus date formatting utilities in the frontend.
Reviewed Changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
mail/mail/doctype/email_message/search.py | New EmailSearch class to manage Redisearch index operations |
mail/mail/doctype/email_message/email_message.py | Integrated index updates on create/update/destroy of email messages |
mail/hooks.py | Scheduled and migration-triggered background index build |
mail/api/mail.py | Added search_mails endpoint for querying the search index |
frontend/src/utils/index.ts | Added getFormattedDate utility for date display |
frontend/src/types/doctypes.ts | Updated doc comment timestamps for frontend type definitions |
frontend/src/pages/MailboxView.vue | Integrated search modal, date formatting, and search keyboard shortcut |
frontend/src/index.css | Adjusted global text color utility class |
frontend/src/components/SendMail.vue | Minor UI class cleanup |
frontend/src/components/Modals/SearchModal.vue | New search modal component |
frontend/src/components/MailListItem.vue | Removed redundant text color class |
frontend/src/components/HeaderActions.vue | Added search button and keyboard shortcut handler |
frontend/src/components/Controls/HorizontalControl.vue | Simplified conditional class binding |
frontend/src/components/AppsMenu.vue | Removed redundant text color class |
Comments suppressed due to low confidence (1)
mail/api/mail.py:498
- The function returns a frappe._dict with
docs
,total
, andduration
, not alist[dict]
. Update the return annotation or transform the output to a plain list structure as documented.
def search_mails(query) -> list[dict]:
Screen.Recording.2025-07-01.at.10.54.04.AM.mov