1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Revert "Tools: Adding debug info to tests"

This reverts commit 154b3573a4.
This commit is contained in:
Laurent Cozic 2020-11-29 16:47:07 +00:00
parent b780a62588
commit d588bddfaa
2 changed files with 0 additions and 10 deletions

View File

@ -28,7 +28,6 @@ export default async function(request: Request) {
options.caseInsensitive = true;
results = await ModelClass.all(options);
} else {
console.info('routes/search: options:', defaultLoadOptions(request, ModelType.Note));
results = await SearchEngineUtils.notesForQuery(query, defaultLoadOptions(request, ModelType.Note));
}

View File

@ -11,13 +11,9 @@ class SearchEngineUtils {
searchType = SearchEngine.SEARCH_TYPE_BASIC;
}
console.info('SearchEngineUtils: search type', searchType);
const results = await SearchEngine.instance().search(query, { searchType });
const noteIds = results.map(n => n.id);
console.info('SearchEngineUtils: results', results);
// We need at least the note ID to be able to sort them below so if not
// present in field list, add it.L Also remember it was auto-added so that
// it can be removed afterwards.
@ -34,12 +30,8 @@ class SearchEngineUtils {
conditions: [`id IN ("${noteIds.join('","')}")`],
}, options);
console.info('SearchEngineUtils: previewOptions', previewOptions);
const notes = await Note.previews(null, previewOptions);
console.info('SearchEngineUtils: notes', notes);
// By default, the notes will be returned in reverse order
// or maybe random order so sort them here in the correct order
// (search engine returns the results in order of relevance).
@ -50,7 +42,6 @@ class SearchEngineUtils {
if (idWasAutoAdded) delete sortedNotes[idx].id;
}
console.info('SearchEngineUtils: sortedNotes', sortedNotes);
// Note that when the search engine index is somehow corrupted, it might contain
// references to notes that don't exist. Not clear how it can happen, but anyway