nathanhleung / uclagrades.com

📊 Website with UCLA grade distributions from 2021-2024
https://uclagrades.com
6 stars 4 forks source link

Improve departmental search results for multi-word queries #14

Open TomBinford opened 1 year ago

TomBinford commented 1 year ago

Some queries that could work better than they do: "poli sci" should match POL SCI (Political Science) but currently gives 0 results

"bio chem" should match BIOL CH (Biological Chemistry) but currently gives 0 results Ideally "biochem" would also match BIOL CH where it currently only matches CHEM; that might have to be hardcoded like "cs" -> "com sci" is.

"chem e" should match CH ENGR (Chemical Engineering) but currently gives 0 results

"mech e" should match MECH&AE (Mechanical and Aerospace Engineering) but currently gives 0 results

christopherm99 commented 1 year ago

This is as simple as using a fuzzy search instead of an exact match search. Using a tool like https://github.com/farzher/fuzzysort would also even close #10.