فهرست منبع

chore: search options tune

Tienson Qin 4 سال پیش
والد
کامیت
1af67a0a24
2فایلهای تغییر یافته به همراه3 افزوده شده و 3 حذف شده
  1. 1 1
      src/main/frontend/components/search.cljs
  2. 2 2
      src/main/frontend/search.cljs

+ 1 - 1
src/main/frontend/components/search.cljs

@@ -244,7 +244,7 @@
         search-q (state/sub :search/q)
         show-result? (boolean (seq search-result))
         blocks-count (or (db/blocks-count) 0)
-        timeout (if (> blocks-count 2000) 500 100)]
+        timeout (if (> blocks-count 2000) 500 300)]
     (rum/with-context [[t] i18n/*tongue-context*]
       [:div#search.flex-1.flex
        [:div.inner

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

@@ -39,7 +39,7 @@
                         (clj->js {:keys ["uuid" "content"]
                                   :shouldSort true
                                   :tokenize true
-                                  :minMatchCharLength 3
+                                  :minMatchCharLength 2
                                   :distance 1000
                                   :threshold 0.35}))]
       (swap! indices assoc-in [repo :blocks] indice)
@@ -56,7 +56,7 @@
                         (clj->js {:keys ["name"]
                                   :shouldSort true
                                   :tokenize true
-                                  :minMatchCharLength 3
+                                  :minMatchCharLength 2
                                   :distance 1000
                                   :threshold 0.35
                                   }))]