search now supports searching / ordering by note size

This commit is contained in:
zadam
2021-01-22 22:20:17 +01:00
parent 480aec1667
commit 872e81fe1f
9 changed files with 93 additions and 20 deletions

View File

@@ -15,7 +15,7 @@ async function search(note) {
if (searchScript) {
searchResultNoteIds = await searchFromRelation(note, 'searchScript');
} else if (searchString) {
} else {
const searchContext = new SearchContext({
fastSearch: note.hasLabel('fastSearch'),
ancestorNoteId: note.getRelationValue('ancestor'),
@@ -27,8 +27,6 @@ async function search(note) {
searchResultNoteIds = searchService.findNotesWithQuery(searchString, searchContext)
.map(sr => sr.noteId);
} else {
searchResultNoteIds = [];
}
// we won't return search note's own noteId