Skip to content

Commit

Permalink
prevent processing more than 1000 identities if member has it
Browse files Browse the repository at this point in the history
  • Loading branch information
epipav committed Jan 4, 2024
1 parent c42e8d1 commit 2cd845a
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ export async function getMergeSuggestions(

let hasFuzzySearch = false

for (const identity of member.nested_identities) {
// prevent processing more than 1000 identities because of opensearch limits
for (const identity of member.nested_identities.slice(0, 1000)) {
if (identity.string_username.length > 0) {
// weak identity search
identitiesPartialQuery.should[1].nested.query.bool.should.push({
Expand Down

0 comments on commit 2cd845a

Please sign in to comment.