mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-23 21:31:29 +01:00
add each token as a search term
This commit is contained in:
parent
d79865fce2
commit
9e97b1e656
@ -111,11 +111,12 @@ export class SearchService implements SearchServiceAbstraction {
|
||||
// tslint:disable-next-line
|
||||
const soWild = lunr.Query.wildcard.LEADING | lunr.Query.wildcard.TRAILING;
|
||||
searchResults = index.query((q) => {
|
||||
q.term(query, { fields: ['name'], wildcard: soWild });
|
||||
q.term(query, { fields: ['subtitle'], wildcard: soWild });
|
||||
q.term(query, { fields: ['login.uris'], wildcard: soWild });
|
||||
lunr.tokenizer(query).forEach((token) => {
|
||||
q.term(token.toString(), {});
|
||||
const t = token.toString();
|
||||
q.term(t, { fields: ['name'], wildcard: soWild });
|
||||
q.term(t, { fields: ['subtitle'], wildcard: soWild });
|
||||
q.term(t, { fields: ['login.uris'], wildcard: soWild });
|
||||
q.term(t, {});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user