Explorar o código

fix(search): fine tune page title search strategy

Andelf hai 1 ano
pai
achega
185b5c2dd8
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  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)))