TUM-Dev / NavigaTUM

Navigating around TUM with excellence – A website and API to search for rooms, buildings and other places
https://nav.tum.de
GNU General Public License v3.0
40 stars 8 forks source link

Highlighting of words with typos #513

Open octycs opened 1 year ago

octycs commented 1 year ago

Describe the bug

I find it irritating if highlighting for numbers in search has typo tolerance.

To Reproduce Steps to reproduce the behavior:

  1. Search for a room using the TUMonline ID

Expected behavior Only numbers that are exactly equal like should be highlighted.

Screenshots image (Note the searched for room does not exist, which is not immediately apparent)

Additional context It seems like Meilisearch still does not haven an option to disably typo-tolerance for numbers in highlighting. So far only disableOnWords could be an option, but I don't think it would be a good idea to put ~300 most used numbers there. Maybe worth testing though.

Edit: The above applies to search matching (not highlighting). For highlighting there is also showMatchesPosition now, which we could use for post-processing.

CommanderStorm commented 1 year ago

I would prefer this being a preprocessing pass in which we adjust the highlighting of words which are matched using typos.

Dicking with the typoTolerance or disableOnWords sounds like an eazy way to loose the edge we have in searching easily.