Full-text non-case-sensitive string query

Is it possible to ignore case sensitive string queries? Say I have the multiple nodes with “Climate Trace”, “Climate TRACE”, “climatetrace”. How do I write the correct query to make sure I don’t miss any nodes? Is there regex capability?

{{query “climate trace”}}

1 Like

Advanced queries support regex.
Here’s the query for you:

#+BEGIN_QUERY
{:title "Climate Trace"
:query
[:find (pull ?b [*])
:in $ ?input
:where
[(str "(?i)" ?input) ?pattern]
[?b :block/content ?c]
[(re-pattern ?pattern) ?q]
[(re-find ?q ?c)]]
:inputs ["climate trace"]
}
#+END_QUERY
4 Likes

I was using {{query "term"}} but that is case sensitive, so I was open a question here to ask for a case-agnostic solution. Discourse suggested this page, which is exactly what I was looking for.
Thank you :pray:

1 Like