initial work on note fulltext (schema changes, updating...)

This commit is contained in:
zadam
2019-03-10 17:02:23 +01:00
parent 05374becfd
commit d25a1e3ed9
11 changed files with 469 additions and 142 deletions

View File

@@ -3,6 +3,7 @@ const log = require('./log');
const eventLogService = require('./event_log');
const syncTableService = require('./sync_table');
const eventService = require('./events');
const noteFulltextService = require('../services/note_fulltext');
async function updateEntity(sync, entity, sourceId) {
const {entityName} = sync;
@@ -61,6 +62,8 @@ async function updateNote(entity, sourceId) {
await syncTableService.addNoteSync(entity.noteId, sourceId);
});
noteFulltextService.triggerNoteFulltextUpdate(entity.noteId);
log.info("Update/sync note " + entity.noteId);
}
}
@@ -75,6 +78,8 @@ async function updateNoteContent(entity, sourceId) {
await sql.replace("note_contents", entity);
await syncTableService.addNoteContentSync(entity.noteContentId, sourceId);
noteFulltextService.triggerNoteFulltextUpdate(entity.noteId);
});
log.info("Update/sync note content " + entity.noteContentId);