2 ms·
> (1) code search supports case-insensitive matching. I'm not quite sure why this matters. Either you are case folding before you store and both cases are the
by kevincox 5y ago
> (1) code search supports case-insensitive matching.
I'm not quite sure why this matters. Either you are case folding before you store and both cases are the same or you are expanding the query to consider all cases and both cases are the same. You are effectively storing "UTF-8" anyways. It is just whether you are storing 3 bytes or 3 characters.
> (2) the search algorithm uses distance between trigram occurrences to reduce the number of matches.
Could you not still measure this distance in codepoints? Or is there a benefit to tying this to the length of the trigrams?
> The same consideration holds if you want to support searches where "a" also matches "á" and "ã".
Well IIRC á can be two codepoints as well (if it isn't normalized) so don't you need to handle this case anyways?