1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-29 22:48:10 +02:00

Search engine: normalize text

This commit is contained in:
Laurent Cozic
2019-01-13 16:05:07 +00:00
parent 4472590133
commit a1f0bd1e6c
4 changed files with 72 additions and 4 deletions

View File

@@ -29,6 +29,11 @@ class ItemChange extends BaseModel {
}
}
static async lastChangeId() {
const row = await this.db().selectOne('SELECT max(id) as max_id FROM item_changes');
return row && row.max_id ? row.max_id : 0;
}
// Because item changes are recorded in the background, this function
// can be used for synchronous code, in particular when unit testing.
static async waitForAllSaved() {

View File

@@ -164,6 +164,7 @@ class Setting extends BaseModel {
'resourceService.lastProcessedChangeId': { value: 0, type: Setting.TYPE_INT, public: false },
'searchEngine.lastProcessedChangeId': { value: 0, type: Setting.TYPE_INT, public: false },
'searchEngine.initialIndexingDone': { value: false, type: Setting.TYPE_BOOL, public: false },
};
return this.metadata_;