Skip to content

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

Merged
merged 9 commits into from
Jun 30, 2025
Merged

feat: full text search #217

merged 9 commits into from
Jun 30, 2025

Conversation

krantheman
Copy link
Member

@krantheman krantheman commented Jun 25, 2025

Screen.Recording.2025-07-01.at.10.54.04.AM.mov

@krantheman krantheman marked this pull request as draft June 25, 2025 09:47
@krantheman krantheman requested a review from Copilot June 27, 2025 11:51
@krantheman krantheman marked this pull request as ready for review June 27, 2025 11:51
Copy link
Contributor

@Copilot Copilot AI left a 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, and duration, not a list[dict]. Update the return annotation or transform the output to a plain list structure as documented.
def search_mails(query) -> list[dict]:

@krantheman krantheman merged commit cc6df21 into frappe:develop Jun 30, 2025
3 checks passed
@krantheman krantheman deleted the feat-search branch July 1, 2025 10:38
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