diff options
Diffstat (limited to 'ext/js/language/dictionary-database.js')
-rw-r--r-- | ext/js/language/dictionary-database.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/js/language/dictionary-database.js b/ext/js/language/dictionary-database.js index 25adb571..c20921b5 100644 --- a/ext/js/language/dictionary-database.js +++ b/ext/js/language/dictionary-database.js @@ -196,7 +196,7 @@ class DictionaryDatabase { } } - findTermsBulk(termList, dictionaries, wildcard) { + findTermsBulk(termList, dictionaries, matchType) { const visited = new Set(); const predicate = (row) => { if (!dictionaries.has(row.dictionary)) { return false; } @@ -206,17 +206,17 @@ class DictionaryDatabase { return true; }; - const indexNames = (wildcard === 'prefix') ? ['expressionReverse', 'readingReverse'] : ['expression', 'reading']; + const indexNames = (matchType === 'suffix') ? ['expressionReverse', 'readingReverse'] : ['expression', 'reading']; let createQuery; - switch (wildcard) { - case 'suffix': + switch (matchType) { + case 'prefix': createQuery = this._createBoundQuery1; break; - case 'prefix': + case 'suffix': createQuery = this._createBoundQuery2; break; - default: + default: // 'exact' createQuery = this._createOnlyQuery1; break; } |