mirror of
https://github.com/logseq/logseq.git
synced 2026-04-30 17:06:23 +00:00
fix: and-or query
This commit is contained in:
@@ -480,8 +480,7 @@ Some bindings in this fn:
|
||||
(let [forms (set (flatten q))
|
||||
syms ['?b '?p 'not]
|
||||
[b? p? not?] (-> (set/intersection (set syms) forms)
|
||||
(map syms))
|
||||
or? (contains? (set (flatten form)) 'or)]
|
||||
(map syms))]
|
||||
(cond
|
||||
not?
|
||||
(cond
|
||||
@@ -497,16 +496,6 @@ Some bindings in this fn:
|
||||
:else
|
||||
q)
|
||||
|
||||
or?
|
||||
(cond
|
||||
(->> (flatten form)
|
||||
(remove (every-pred string? page-ref/page-ref?))
|
||||
(some string?)) ; block full-text search
|
||||
(concat [['?b :block/content '?content]] [q])
|
||||
|
||||
:else
|
||||
q)
|
||||
|
||||
(and b? p?)
|
||||
(concat [['?b :block/page '?p]] q)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user