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)
|
||||
(protocol/query engine q option)))))
|
||||
|
||||
(defn transact-blocks!
|
||||
(defn- transact-blocks!
|
||||
[repo data]
|
||||
(when-let [engine (get-engine repo)]
|
||||
(protocol/transact-blocks! engine data)))
|
||||
|
@ -237,7 +237,8 @@
|
|||
blocks-to-add (->> (filter (fn [block]
|
||||
(contains? blocks-to-add-set (:db/id block)))
|
||||
blocks-result)
|
||||
(map search-db/block->index))
|
||||
(map search-db/block->index)
|
||||
(remove nil?))
|
||||
blocks-to-remove-set (->> (remove :added blocks)
|
||||
(map :e)
|
||||
(set))]
|
||||
|
|
Loading…
Reference in New Issue