Skip to content

Commit

Permalink
Fixed advanced search in labels not working
Browse files Browse the repository at this point in the history
Fixed certain characters in Mbox file name not working
  • Loading branch information
jfarwer committed Aug 18, 2022
1 parent 6469e5b commit f1ce31b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
3 changes: 3 additions & 0 deletions WebContent/js/browseMessages.js
Expand Up @@ -60,8 +60,11 @@ var Navigation = function(){
});

// forward/back nav

if (typeof jog !== 'undefined') { // 2022.08.02 Aries Tsang
$('#page_forward').click(jog.forward);
$('#page_back').click(jog.backward);
}
};

// annoying, have to declare these connector funcs, because jog is defined only in setupEvents, so can't directly use those funcs in the Navigation's interface.
Expand Down
5 changes: 4 additions & 1 deletion src/java/edu/stanford/muse/email/MboxEmailStore.java
Expand Up @@ -200,7 +200,10 @@ protected Folder openFolderWithoutCount(Store s, String fname) throws MessagingE

//This is the root folder in the namespace provided
//see http://docs.oracle.com/javaee/5/api/javax/mail/Store.html#getDefaultFolder%28%29
Folder folder = store.getDefaultFolder();
// 2022-08-11 Aries Tsang
// Folder folder = store.getDefaultFolder();
Folder folder = store.getFolder(fname);

if (folder == null)
throw new RuntimeException ("Invalid folder: " + fname);

Expand Down
11 changes: 10 additions & 1 deletion src/java/edu/stanford/muse/index/SearchResult.java
Expand Up @@ -347,7 +347,16 @@ private static SearchResult filterForAnnotationText(SearchResult inputSet) {
String comment = annotationManager.getAnnotation(edoc.getUniqueId());
if (!Util.nullOrEmpty(comment)) {
comment = comment.toLowerCase();
return annotations.contains(comment);
// 2022-08-09 Aries Tsang
boolean isFound=false;
for (String f1 : annotations) {
if (comment.contains(f1)) {
isFound = true;
break;
}
}
// return annotations.contains(comment);
return isFound;
}else
return false;
}).collect(Collectors.toMap(Map.Entry::getKey,Map.Entry::getValue));
Expand Down

0 comments on commit f1ce31b

Please sign in to comment.