Open quantranhong1999 opened 1 month ago
We can reuse class LuceneMemorySearchHighlighter
(In pr Lucene memory impl ) for Lucene FS impl.
The fact LuceneMemorySearchHighlighter
only use lucene highlight api, it's nothing special just for memory.
LuceneMemorySearchHighLightTest
to contract class -> and new one Lucene FS impl test
Why
As we plan to really use Lucene as a search option, we need to back JMAP SearchSnippet extension by implementing a Lucene Search Highlight APIs.
How
apache-james-mailbox-lucene
:LuceneSearchHighlighter
inapache-james-mailbox-lucene
.Using the Lucene highlight APIs: https://lucene.apache.org/core/9_0_0/highlighter/org/apache/lucene/search/highlight/package-summary.html From what I see, with Lucene, highlight works on search result - which mean we need to search again.
POC: https://github.com/quantranhong1999/james-project/commit/a8ddbe51a366ba6567fda9f8fc6e5251a8ece175
DoD
Pass contract tests