Skip to content
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

Email/query Allow filtering by text #3735

Closed
remk opened this issue Sep 2, 2020 · 1 comment
Closed

Email/query Allow filtering by text #3735

remk opened this issue Sep 2, 2020 · 1 comment
Assignees
Labels
III Time spent (3 halth day)
Milestone

Comments

@remk
Copy link
Member

remk commented Sep 2, 2020

As a user i want to be able to for a value in any text part of a mail body and its From, To, Cc, Bcc, and Subject header fields

text: String Looks for the text in Emails. The server MUST look up text in the From, To, Cc, Bcc, and Subject header fields of the message and SHOULD look inside any text/* or other body parts that may be converted to text by the server. The server MAY extend the search to any additional textual property.

Why

As an user i want to be able to select the mail by searching for a text in those headers or body text parts like this :

[[ "Email/query",{
  "accountId": "ue150411c",
  "filter":  {
     "text": "james"
}
}, "0" ]]

should return the emails containing 'james' in their From, To, Cc, Bcc, and Subject headers or in any text/* parts of its body

HOW

  • accept a simple FilterCondition with an optional 'text' field

  • filter the query with those parameters. It don't need to be an exact match. For the result to appear any fields should contains the value : .value.

The exact semantics for matching String fields is deliberately not defined to allow for flexibility in indexing implementation, subject to the following:

    Any syntactically correct encoded sections [@!RFC2047] of header fields with a known encoding SHOULD be decoded before attempting to match text.
    When searching inside a text/html body part, any text considered markup rather than content SHOULD be ignored, including HTML tags and most attributes, anything inside the <head> tag, Cascading Style Sheets (CSS) and JavaScript. Attribute content intended for presentation to the user such as “alt” and “title” SHOULD be considered in the search.
    Text SHOULD be matched in a case-insensitive manner.

    Text contained in either (but matched) single (‘) or double (“) quotes SHOULD be treated as a phrase search; that is, a match is required for that exact word or sequence of words, excluding the surrounding quotation marks.

DOD

  • write integration by supported header fields From, To, Cc, Bcc, and Subject demonstrating that a user can filter the email containing the searched value in any of those fields.
  • write integration demonstrating that a user can filter the email with a value contained in a text/plain part of the body
  • write integration demonstrating that a user can filter the email with a value contained in a text/html part of the body
  • write integration demonstrating that a user can filter the email with a value contained in a text part of a multipart mail
@chibenwa
Copy link
Member

chibenwa commented Sep 3, 2020

Is handling "this full sentence should be matched" but only some of these terms are needed is the scope?

@chibenwa chibenwa added this to the Sprint 2 milestone Sep 3, 2020
@LanKhuat LanKhuat self-assigned this Sep 29, 2020
@chibenwa chibenwa added the I Time spent (1 halth day) label Sep 30, 2020
@chibenwa chibenwa linked a pull request Sep 30, 2020 that will close this issue
@chibenwa chibenwa added II Time spent (2 halth day) III Time spent (3 halth day) and removed I Time spent (1 halth day) II Time spent (2 halth day) labels Sep 30, 2020
@Arsnael Arsnael closed this as completed Oct 1, 2020
@chibenwa chibenwa reopened this Oct 2, 2020
@chibenwa chibenwa closed this as completed Oct 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
III Time spent (3 halth day)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants