Browse Source

fix(search): fine tune page title search strategy

Andelf 1 year ago
parent
commit
185b5c2dd8
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/main/frontend/search/db.cljs

+ 2 - 0
src/main/frontend/search/db.cljs

@@ -113,6 +113,8 @@
                         (clj->js {:keys ["name"]
                                   :shouldSort true
                                   :tokenize true
+                                  :distance 1024
+                                  :threshold 0.5 ;; search for 50% match from the start
                                   :minMatchCharLength 1}))]
       (swap! indices assoc-in [repo :pages] indice)
       indice)))