Closed hungphan227 closed 1 month ago
For each Message, find text that specified in SearchQuery and add highlight tag around them
In the epic topic Benoit mentioned:
Locate part of their text (exact match) and show 100 chars before and 100 chars after. Ideally find a library for that.
I think we can use java regular expression
What do you think about using lucene-highlighter for it? The @quantranhong1999 poc at https://github.com/linagora/james-project/issues/5256
IMO it quiet fine!
// Initialize an in-memory index using ByteBuffersDirectory
Directory directory = new ByteBuffersDirectory();
Lucene "memory" for SearchSnippet memory implement Lucene "prod" for SearchSnippet Lucene implement
What do you think about using lucene-highlighter for it?
...
I LOVE THE IDEA
A LOT
(and I would go further)
How about removing scanning search and replacing it with a memory based Lucene?
Of course we can trigger a mailing list discussion...
Use searchHilighter interface instead
How about removing scanning search and replacing it with a memory based Lucene?
mailing-list: https://www.mail-archive.com/server-dev@james.apache.org/msg74520.html
DoD: Integration test