-
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API highlight control #179
Conversation
39875bd
to
e80a6f8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codewise I think this is fine (only the HTML escaping would be good to still have). The only reason I am not sure whether to switch to MeiliSearches highlighting now, is, that they still seem to treat 'typos' in numbers. For example:
It happens only for IDs longer than 4 characters, which are mainly only in the MW and CH buildings. It's not too bad, but I don't really like it. What do you think?
Well… I do think that it is better to show that MS does typo-tolerance even in these circumstances… I honestly don't see why you think this is a problem… Could you explain your reasoning a bit more? 😅 |
When you go through the search results (in a quick manner), I think you mainly want to see as directly as possible whether this is the result you were looking for or not. And the highlighting helps you by showing you that the highlighted parts match exactly what you typed in. I don't think that the typo-tolerance in search is bad, but I don't like it in the highlighting. I can understand that MeiliSearch does this, because it could be helpful if you search large text databases, but my problem is that it also applies to numbers. I think our ID search is in general quite okay, but not ideal. So I don't object to merging this, it's just that I wouldn't want to leave it this way in the long run (It does also have advantages of course, especially Meilisearch doesn't highlight too much if your search contains a single digit). |
cace587
to
5c0b8e1
Compare
Added the ability to control the highlighting behaviour.
As noticed in #103 It would be nice to make this customizable and not result in hacks as seen in TUM-Dev/Campus-Android#1462 (comment)
Resolves #114
Note:
I have changed the highlighting fields to
<em>
. I can revert this, if you'd like, but I assume this removes at least a bit of code in the webclient, so I thought this would be a better solution.