aleph
aleph copied to clipboard
FEATURE: Allow searching for emails with (specific) attachments
Is your feature request related to a problem? Please describe.
- I want to be able to filter for emails with attachments.
- I want to be able to filter for emails with specific attachments (e.g. based on file name or file extension).
Describe the solution you'd like
schema:Email AND properties.attachments:*should return all emails that have any attachment.schema:Email AND properties.attachments:*.pdfshould return all emails that have an attachment ending with.pdf.
Describe alternatives you've considered
- Searching for
properties.mimeType:multipart/mixedmight help narrowing down the list of emails, but every email that has HTML and plaintext alternatives will also be included by this even if it doesn’t have any attachments.
Additional context
- Email attachments are separate entities that have a reference to the email, but there’s no efficient way to run joins in ES.
- An easy solution probably would be to add the file names of attachments to the
Emailentity itself, e.g. in a newattachmentsproperty. This wouldn’t allow queries for arbitrary attachment properties, but likely cover many use cases.