1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-24 16:49:26 +01:00

switch to only trailing wildcard searches

This commit is contained in:
Kyle Spearrin 2018-08-17 11:05:06 -04:00
parent 9ba3c17626
commit bdbba8c493

View File

@ -101,7 +101,7 @@ export class SearchService implements SearchServiceAbstraction {
} catch { } } catch { }
} else { } else {
// tslint:disable-next-line // tslint:disable-next-line
const soWild = lunr.Query.wildcard.LEADING | lunr.Query.wildcard.TRAILING; const soWild = lunr.Query.wildcard.TRAILING;
searchResults = index.query((q) => { searchResults = index.query((q) => {
q.term(query, { fields: ['name'], wildcard: soWild }); q.term(query, { fields: ['name'], wildcard: soWild });
q.term(query, { fields: ['subTitle'], wildcard: soWild }); q.term(query, { fields: ['subTitle'], wildcard: soWild });