Fix rebuilding of full-text index

This commit is contained in:
Dan Stillman 2017-10-08 16:58:06 -04:00
parent 08d322932d
commit 4fb8f44d01

View file

@ -1652,8 +1652,12 @@ Zotero.Fulltext = Zotero.FullText = new function(){
var items = yield Zotero.DB.columnQueryAsync(sql, params);
if (items) {
yield Zotero.DB.executeTransaction(function* () {
yield Zotero.DB.queryAsync("DELETE FROM fulltextItemWords WHERE itemID IN (" + sql + ")");
yield Zotero.DB.queryAsync("DELETE FROM fulltextItems WHERE itemID IN (" + sql + ")");
yield Zotero.DB.queryAsync(
"DELETE FROM fulltextItemWords WHERE itemID IN (" + sql + ")", params
);
yield Zotero.DB.queryAsync(
"DELETE FROM fulltextItems WHERE itemID IN (" + sql + ")", params
);
});
yield this.indexItems(items, false, true);