commit 7a9966bbe3cbfeb1f82f81d49094f50fce387118
parent d7ce74f1c5058bedd62fdf5c217385e58fa2bb82
Author: Dan Stillman <dstillman@zotero.org>
Date: Sat, 1 Feb 2014 03:12:02 -0500
Fix indexing error adding items with repeated words
Probably words that didn't make it into the same in-memory insertion
batch, since the UNION would make those distinct.
Follow up to #440
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/chrome/content/zotero/xpcom/fulltext.js b/chrome/content/zotero/xpcom/fulltext.js
@@ -266,7 +266,7 @@ Zotero.Fulltext = new function(){
}
Zotero.DB.query('INSERT OR IGNORE INTO fulltextWords (word) SELECT word FROM indexing.fulltextWords');
Zotero.DB.query('DELETE FROM fulltextItemWords WHERE itemID = ?', [itemID]);
- Zotero.DB.query('INSERT INTO fulltextItemWords (wordID, itemID) SELECT wordID, ? FROM fulltextWords JOIN indexing.fulltextWords USING(word)', [itemID]);
+ Zotero.DB.query('INSERT OR IGNORE INTO fulltextItemWords (wordID, itemID) SELECT wordID, ? FROM fulltextWords JOIN indexing.fulltextWords USING(word)', [itemID]);
Zotero.DB.query("REPLACE INTO fulltextItems (itemID, version) VALUES (?,?)", [itemID, 0]);
Zotero.DB.query("DELETE FROM indexing.fulltextWords");