Automattic / bugomattic

Bugomattic is a tool that guides bug reporters to the right actions within large, complex organizations
GNU General Public License v2.0
6 stars 0 forks source link

Tune up description searching match criteria #115

Closed dpasque closed 1 year ago

dpasque commented 1 year ago

What Does This PR Add/Change?

After playing around with the real reporting data, I felt like our current description match logic (just any single token needs to match) was a bit too generous -- you can get a lot of hits sometimes, and they aren't all meaningful!

So, to help with that, I made two changes...

  1. I migrated our stop word filtering to the library [stopword](https://www.npmjs.com/package/stopword) -- it's a bit more comprehensive than our current list, and is now one less thing for us to maintain! 🎉
  2. We now have a stricter threshold to clear. The ratio of (the total number of hits in the description) / (the number of meaningful tokens in the search term) must be >= 0.6 (60%).

Why did that I take that approach? Several notes...

Testing Instructions

Unit tests should still pass!

Best way to test is to use a semi-realistic reporting config locally REACT_APP_REPORTING_CONFIG_NAME='realistic-config' yarn start, and just play around and trust your gut! How does it feel? Do we need to pull back or push further?

Issues

Related to #
Closes #