All pages without property tags::

Hi All,

I would like to find all the pages in my graph without the property tags in order to add it.
How to do?

thanks
Fede

Try this:

#+BEGIN_QUERY
{
 :query [:find (pull ?p [*])
   :where
     [?p :block/name]
     [?p :block/properties ?props]
     (not [(get ?props :tags)])
 ]
}
#+END_QUERY
2 Likes

@Federico_Frosini
Does it work for you?

@mentaloid
in my case it shows some pages, but I still see in graph a lot of pages which is not linked (they do not have tags::)

They are probably pages that have no properties at all.

  • While the specific query looks only among pages that have some properties.
  • To include pages without properties, use the following query:
    #+BEGIN_QUERY
    {
     :query [:find (pull ?p [*])
       :where
         [?p :block/name]
         (or-join [?p]
           (not [?p :block/properties])
           (and
             [?p :block/properties ?props]
             (not [(get ?props :tags)])
           )
         )
     ]
    }
    #+END_QUERY
    
1 Like