Skip to content

fix(grouper): identify events similarity only when titles are same#410

Closed
slaveeks wants to merge 2 commits intomasterfrom
fix/similar-titles
Closed

fix(grouper): identify events similarity only when titles are same#410
slaveeks wants to merge 2 commits intomasterfrom
fix/similar-titles

Conversation

@slaveeks
Copy link
Copy Markdown
Member

No description provided.

@slaveeks slaveeks requested review from e11sy and neSpecc and removed request for e11sy May 21, 2025 15:36
Comment on lines +254 to 261
const similarByTitle = lastUniqueEvents.filter(prevEvent => {
// const distance = levenshtein(event.title, prevEvent.payload.title);

return distance < threshold;
// const threshold = event.title.length * diffTreshold;

// return distance < threshold;
return event.title.toLowerCase() === prevEvent.payload.title.toLowerCase();
}).pop();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets just comment out grouping by Levenshtein and implement grouping by title below.

@@ -249,17 +249,19 @@ export default class GrouperWorker extends Worker {
const lastUniqueEvents = await this.findLastEvents(projectId, eventsCountToCompare);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably, we can find event by title using mongo. We dont need to get 60 events for that.

// groupHash: originalEvent.groupHash,
// }).toArray()).length).toBe(2);
// });

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add test for grouping by title

@neSpecc
Copy link
Copy Markdown
Member

neSpecc commented Aug 5, 2025

Resolved by #433

@neSpecc neSpecc closed this Aug 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants