Hello!
I am using the built-in query generator and I have managed to return all the pages with a certain tag using
{{query (property :tags “grossed”)}}
I would now like to limit the pages again by searching all the pages for certain text like “adenocarcinoma”. When I try {{query (and (property :tags “grossed”) “adenocarcinoma”)}}
I don’t get any results back.
Thank you!
1 Like
It works ok to me. Could you share some example blocks?
If I create a page structured as such:
tags::spcase
ovaries
the search {{query (and (property :tags “spcase”) “ovaries”)}} returns nothing
but {{query (property :tags “spcase”)}} will return the page
Here are some screenshots!
If I do the spcase query I get
But if I search the page for text I know is in one of the blocks of the returned pages like Endometriotic cysts I get nothing back as shown below:
Try this:
#+BEGIN_QUERY
{
:query [:find (pull ?b [*])
:where
[?tag :block/name "spcase"]
[?p :block/tags ?tag]
[?b :block/page ?p]
[?b :block/content ?content]
[(clojure.string/includes? ?content "Endometriotic cysts")]
]
}
#+END_QUERY
1 Like
Thank you, that works perfectly! I would not have been able to figure it out on my own.