fixes and optimizations for search

This commit is contained in:
azivner
2018-06-05 22:47:47 -04:00
parent 45d9c7164c
commit e7a504c66b
4 changed files with 18 additions and 4 deletions

View File

@@ -100,8 +100,7 @@ function search(noteId, tokens, path, results) {
noteId: thisNoteId,
branchId: childParentToBranchId[`${thisNoteId}-${thisParentNoteId}`],
title: noteTitle,
path: retPath.join('/'),
prefix: prefixes[`${thisNoteId}-${thisParentNoteId}`]
path: retPath.join('/')
});
}
@@ -206,9 +205,11 @@ function getNotePath(noteId) {
if (retPath) {
const noteTitle = getNoteTitleForPath(retPath);
const parentNoteId = childToParent[noteId][0];
return {
noteId: noteId,
branchId: childParentToBranchId[`${noteId}-${parentNoteId}`],
title: noteTitle,
path: retPath.join('/')
};