Browse code

[mapi] BM-14906 Fix: try something else to convert from container uid to folder id

Thomas Cataldo authored on 10/06/2019 13:31:33
Showing 1 changed files
... ...
@@ -802,7 +802,9 @@ public class MailIndexService implements IMailIndexService {
802 802
 			searchBuilder.addSort("date", SortOrder.DESC);
803 803
 		}
804 804
 
805
-		logger.debug("{}", searchBuilder.toString());
805
+		if (logger.isDebugEnabled()) {
806
+			logger.debug("{}", searchBuilder.toString());
807
+		}
806 808
 		SearchResponse sr = searchBuilder.execute().actionGet();
807 809
 		SearchHits searchHits = sr.getHits();
808 810
 
... ...
@@ -821,7 +823,8 @@ public class MailIndexService implements IMailIndexService {
821 823
 		result.results = results;
822 824
 		result.totalResults = Long.valueOf(searchHits.getTotalHits()).intValue();
823 825
 		result.hasMoreResults = (searchHits.getTotalHits() > results.size());
824
-
826
+		logger.info("[{}] results: {} (tried {}) / {}, hasMore: {}", dirEntryUid, results.size(),
827
+				searchHits.getHits().length, result.totalResults, result.hasMoreResults);
825 828
 		return result;
826 829
 	}
827 830
 
... ...
@@ -832,7 +835,7 @@ public class MailIndexService implements IMailIndexService {
832 835
 		String folderUid = ((String) source.get("id")).split(":")[0];
833 836
 		String contUid = "mbox_records_" + folderUid;
834 837
 		String subject = (String) source.get("subject");
835
-		logger.info("matching result:{} -> {} in folder:{}", itemId, subject, folderUid);
838
+		logger.debug("matching result itemId:{} subject:'{}' in folder:{}", itemId, subject, folderUid);
836 839
 		int size = (int) source.get("size");
837 840
 		ZonedDateTime date = ZonedDateTime.parse((String) source.get("date"));
838 841
 		Date messageDate = Date.from(date.toInstant());