-
Notifications
You must be signed in to change notification settings - Fork 32
Description
Point 1: In Twake Mail I want to have a different OpenSearch mapping / query pattern than in James.
(Ease of change, project independance, etc...)
- Have an interface for the mapping and for the CriterionConverter to ease overrides.
Point 2 Enable "prefix search" but limit it to the subject
-> Why: can improve search result efficiency (?)
But we limit it to subject (a small field) as ngram use is prone to x10-50 space amplicication
(we may afford this only on the subject)
The idea would be to have :
- 1 indexed subfield with the standard analyzer like today
- 1 indexed subfield with the ngrams
If the search contains a space
then we use only standard analyzer (heuristic here: if theres a space its not a prefix) but if not we look for both.
We need to have a configuration to enable point 2, disabled by default.
To be adopted on LNG first. Create the new index (empty) and do a per user reindexing on all users.
Adopt on TWP preprod + prod too.
- linagora/james-project-private#1077To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
Sub-issues
Collapse Sub-issuesSub-issues
- Manage this item control⌃ shift⇧ uU
- Manage this item control⌃ shift⇧ uU
- Manage this item control⌃ shift⇧ uU
Activity
chibenwa commentedon May 19, 2025
The idea:
And of course adapt the CriterionConverter logic to this.
Arsnael commentedon May 30, 2025
Quick brainstorm on Point 1:
Mailbox mapping:
In James =>
In TMail => have a TMailMailboxMapping implements MailboxMappingFactory with a different mapping
CriterionConverter:
In James =>
In TMail => have a TMailCriterionConverter with a different logic
quantranhong1999 commentedon May 30, 2025
Sounds reasonable to me. I had a look at
MessageToOpenSearchJson
BTW. We do not need to interface it because likely for now, we still index the same JSON document, just with a different analyzer.quantranhong1999 commentedon May 30, 2025
For point 2, it would use what was set up thanks to point 1.
In
TMailMailboxMapping
, for the subject field:In
TMailCriterionConverter
, implement this extra logic for subject search query: If the search contains a space then we use only standard analyzer (heuristic here: if theres a space its not a prefix) but if not we look for both.We can do a configuration and module chooser IMO. If point 2 enabled, we load
TMailMailboxMapping
+TMailCriterionConverter
, otherwise we load what it is today in James.We need to add an entry in
upgrade-instructions.md
to document the process.chibenwa commentedon May 30, 2025
IMO we can keep the same JSON document
+1 this is what I had in mind