mirror of https://github.com/logseq/logseq
fix(search): cannot batch insert to search db
parent
00bc964a9c
commit
e196b8eda8
|
@ -96,7 +96,7 @@
|
||||||
(when-not (string/blank? q)
|
(when-not (string/blank? q)
|
||||||
(protocol/query engine q option)))))
|
(protocol/query engine q option)))))
|
||||||
|
|
||||||
(defn transact-blocks!
|
(defn- transact-blocks!
|
||||||
[repo data]
|
[repo data]
|
||||||
(when-let [engine (get-engine repo)]
|
(when-let [engine (get-engine repo)]
|
||||||
(protocol/transact-blocks! engine data)))
|
(protocol/transact-blocks! engine data)))
|
||||||
|
@ -237,7 +237,8 @@
|
||||||
blocks-to-add (->> (filter (fn [block]
|
blocks-to-add (->> (filter (fn [block]
|
||||||
(contains? blocks-to-add-set (:db/id block)))
|
(contains? blocks-to-add-set (:db/id block)))
|
||||||
blocks-result)
|
blocks-result)
|
||||||
(map search-db/block->index))
|
(map search-db/block->index)
|
||||||
|
(remove nil?))
|
||||||
blocks-to-remove-set (->> (remove :added blocks)
|
blocks-to-remove-set (->> (remove :added blocks)
|
||||||
(map :e)
|
(map :e)
|
||||||
(set))]
|
(set))]
|
||||||
|
|
Loading…
Reference in New Issue