How to automatically hide sub-blocks in query results in Logseq

I’m wandering how to automatically hide sub-blocks in query results in Logseq.
Picture1 is what I get now, but I want hide sub-blocks automatically like picutre2, is there any way to achieve this? Thank you so much!


  • Each block is either collapsed or expanded everywhere.
    • Query results (as well as embeddings) show the block as it is.
    • If you change its status (expanded/collapsed) in one place, it changes everywhere.
  • If you want to hide its children only in results, should use an advanced query to return not the block itself, but its contents.

Thank you, does returning its contents in advanced query only return plain text?

Yes, unfortunately. Can still manipulate the result with code, but queries are not currently designed to generate nice views. They serve more like advanced search with some extra features.

thank you so much, in fact i’d like to use the parent blocks to summarize, so i can find it directly in query.