eclipse-ee4j / eclipse-ee4j/angus-mail

IMAP hybrid searching

Open
#146 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
87
Forks
23
PR merge metrics
No merged PRs in 30d

Description

IMAP search terms and servers have limitations on the operations that can be performed server side. By default, AngusMail will fallback to client side searching which will get all message ids and perform client side searching on the email envelopes or body which is slow if the mailbox contains a lot of messages. I think there are some cases we could still use the server side search to narrow the number message ids that would then be used in the client side search. Currently the code is either all server side or all client side.

An example would be searching for UTF-8 subject in outlook365 which doesn't allow UTF-8 in IMAP search but can store emails with UTF-8 encoded subjects. For hybrid searching, we could examine the SubjectTerm to see if the UTF-8 data contained runs of ascii data that we could then pick the largest run or largest 2 runs of ascii data to create an AND term for the server side search. Then apply the client side search on the smaller set of message ids to match the full subject which contains the UTF-8 data to filter false positive matches.

Contributor guide

Open the contributing guide

Research direction

The issue names no files, tests, or entry points. Begin by locating the current all-server versus all-client search selection and SubjectTerm handling. Define how hybrid narrowing and subsequent client-side filtering should be verified before implementing the proposed behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.