mirror of
https://github.com/logseq/logseq.git
synced 2026-05-05 11:26:26 +00:00
feat: add page content level search plugin API
This commit is contained in:
@@ -23,6 +23,9 @@
|
||||
(query [_this q opts]
|
||||
(call-service! service "search:query" (merge {:q q} opts) true))
|
||||
|
||||
(query-page [_this q opts]
|
||||
(call-service! service "search:queryPage" (merge {:q q} opts) true))
|
||||
|
||||
(rebuild-blocks-indice! [_this]
|
||||
;; Not pushing all data for performance temporarily
|
||||
;;(let [blocks (search-db/build-blocks-indice repo)])
|
||||
@@ -34,6 +37,12 @@
|
||||
{:data {:added blocks-to-add
|
||||
:removed blocks-to-remove-set}})))
|
||||
|
||||
(transact-pages! [_this data]
|
||||
(let [{:keys [pages-to-remove-set pages-to-add]} data]
|
||||
(call-service! service "search:transactpages"
|
||||
{:data {:added pages-to-add
|
||||
:removed pages-to-remove-set}})))
|
||||
|
||||
(truncate-blocks! [_this]
|
||||
(call-service! service "search:truncateBlocks" {}))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user