Files
danbooru/db/migrate/20201213052805_add_extension_fuzzy_str_match.rb
evazion 6a46aeb55c autocomplete: tune autocorrect algorithm.
Tune autocorrect to produce fewer false positives. Before we used
trigram similarity. Now we use Levenshtein edit distance with a dynamic
typo threshold. Trigram similarity was able to correct large
transpositions (e.g. `miku_hatsune` -> `hatsune_miku`), but it was bad
at correcting small typos. Levenshtein is good at small typos, but can't
correct large transpositions.
2020-12-13 04:10:48 -06:00

6 lines
123 B
Ruby

class AddExtensionFuzzyStrMatch < ActiveRecord::Migration[6.0]
def change
enable_extension "fuzzystrmatch"
end
end