Skip to content

Commit

Permalink
Limit search to 6 terms for people
Browse files Browse the repository at this point in the history
  • Loading branch information
williambelle committed May 17, 2024
1 parent f90a331 commit 1bac588
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/services/people.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ function getPersonByRoom (room) {
}

function getPersonByName (name) {
// Limit search to 6 terms for performance.
const term = util.removeAccents(name);
const terms = term.split(/\s+/);
const terms = term.split(/\s+/).slice(0, 6);
const ldapQuery = ldapUtil.buildLdapQueryForPerson(util.permutations(terms));
return getPerson(ldapQuery);
}
Expand Down

0 comments on commit 1bac588

Please sign in to comment.