vttranlina commented on code in PR #2476:
URL: https://github.com/apache/james-project/pull/2476#discussion_r1827326835


##########
mailbox/lucene/src/main/java/org/apache/james/mailbox/lucene/search/LuceneMessageSearchIndex.java:
##########
@@ -394,23 +398,25 @@ public static class LuceneMessageSearchIndexGroup extends 
org.apache.james.event
 
     private final MailboxId.Factory mailboxIdFactory;
     private final MessageId.Factory messageIdFactory;
+    private final LuceneIndexableDocument indexableDocument;
 
     @VisibleForTesting
     final IndexWriter writer;
     private final Directory directory;
 
     private int maxQueryResults = DEFAULT_MAX_QUERY_RESULTS;
 
-    private boolean suffixMatch = false;
+    private boolean suffixMatch = true;

Review Comment:
   If true, it will replace `PrefixQuery` with `WildcardQuery`.
   it for `SearchCapabilities.PartialEmailMatch` 
   
   Bellow is the document related to this variable
   ```
   If set to true this implementation will use WildcardQuery to match suffix 
and prefix. This is what RFC3501 expects but is often not what the user does. 
It also slow things a lot if you have complex queries which use many "TEXT" 
arguments. If you want the implementation to behave strict like RFC3501 says, 
you should set this to true.
   The default is false for performance reasons
   ```
   
   If performance is concern, we can keep old behavior, (false)
   



##########
mailbox/lucene/src/test/java/org/apache/james/mailbox/lucene/search/LuceneMemorySearchHighLighterTest.java:
##########
@@ -112,4 +126,46 @@ public void applyRightsCommand(MailboxId mailboxId, 
Username owner, Username del
             
MailboxACL.command().forUser(delegated).rights(MailboxACL.FULL_RIGHTS).asAddition(),
             session(owner))).run();
     }
+
+
+    @Test
+    void shouldHighlightAttachmentTextContentWhenTextBodyDoesNotMatch() throws 
Exception {

Review Comment:
   moved it to contract class 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org

Reply via email to