Lesson 2: Why You Should Outline and Link Your Notes

Information becomes interesting when you can relate it to other information. But for knowledge to emerge, you need to spark it to life by providing some structure.

Many fans of Logseq like the idea of dumping their thoughts on the Journals page. As you don’t have to think about where to store information, you gain mental space. But what if you don’t know where you left some information that you need now?

If you’ve been using Logseq without caring about any structure, you’ll probably spend more and more time looking for notes. Maybe you even start to miss your files and folders. After all, having some place to navigate to is much easier than traversing a messy outline. Luckily, there is a way to create order in the chaos.

The two main ways to structure notes in Logseq are the outline structure and links (either wikilinks with the [[double square brackets]] or #hashtags).

Let’s get started by seeing how to properly outline our notes with Logseq.

Why Logseq’s outline structure matters

Logseq is a tool to write outlines. Don’t try to make it behave like any old plain text editor, as the outline structure is fundamental to how Logseq functions.

By nesting blocks underneath other blocks, you create a hierarchy in your notes. Forget files and folders; in Logseq we organize things by branch.

The idea of outlining is simple: anytime you hit the Tab key, the block your cursor is in moves to the right. Indenting a block under the block above creates a parent-child relationship. This is how you fundamentally structure your notes in Logseq:

parent-child-example-letters_1641572097841_0

Let’s walk through the example step-by-step:

  • Block A is a parent block; B and C are children of A; block D is a grandchild of A.
  • Block B is a child of A and it’s in the same branch as blocks C and D.
  • Block C is a child of A and the parent of D.

By indenting blocks, you add context to all the blocks in the branch.

Let’s turn the example above into links and navigate to the linked references of block D, which we’ll name Child D:

By going to the page of Child D, we can see the hierarchy it’s in: first up is Parent and child C and then Parent A. These are the other blocks in the branch that Child D is in.

By clicking on one of the parents, the whole branch becomes visible:

child-d-branch_1641572326932_0

Hey, what’s that? Why didn’t Child B show in the branch when navigating to Child D? That’s because B is a sibling of D’s parent block (C). Siblings are at the same indentation level so they can’t “see” each other in Logseq’s data structure.

Anything that’s higher up the branch of a block can act as a filter value. For example, links. As we’ll see soon, this concept is crucial.

Why linking matters

For our purposes (queries), links are like search terms. Anytime you add [[double square brackets]] or #hashtags to words, you turn them into a search term you can use in queries.

What happens when you use one or more links in a query? You tell Logseq to read each block in your database. Anytime it encounters the link(s) in a block, it will include that block in the search results.

Why would you use links as search terms instead of plain old text? You could just use text, but using links as search terms allows you to be much more intentional about what results you get.

What’s more, when a parent block contains a link, it applies to all of its children. In other words: every child block will inherit any links and hashtags from any of its parent blocks. This is not possible with plain text search.

But before we get into writing queries, let’s experiment elsewhere with links as filter values.

Using links to filter linked references

If you’ve been using Logseq for a while, you may have noticed a Linked References section appearing at the bottom of a page whenever you link to it. This is bi-directional linking in action.

Whenever you link to a page in Logseq, you actually create two links; one that you write, and one that automatically appears in the Linked references section of the page you link to.

Each page has this Linked references section, showing all the blocks that point to that page:

If you have many results showing in the Linked References, it may be difficult to find what you’re looking for. That’s where filters come in, which are a soft introduction to query logic.

Filters can be found next to linked references, which you can find on any page that has links leading to it. You can recognize the filter button by its funnel symbol. When you click the filter button, you see the following pop-up. The shown values are any links (using brackets or hashtags) that are in the linked references:

By clicking a filter value, you include it, meaning that only the block with the value you selected will show on the page. When you Shift-Click a filter value, you exclude it from the page, meaning that any block that contains that value is hidden.

Logseq will remember what filters you’ve set; whenever you return to the page, the filter is still applied.

You can recognize an active filter by its color; when the filter is set to include links it’ll turn green:

filter-include_1641572468269_0

When a filter is set to exclude blocks that have certain links, it’ll turn red:

filter-exclude_1641572484236_0

When a filter is set to both include and exclude blocks that have certain links, it’ll turn orange:

include-exclude-combined-filter

Filters are handy when you only want to hide irrelevant results connected to a single page. But what if you want more precisely define your search results, or want to search across multiple pages? That’s why we have queries.

Filters are an excellent introduction to boolean thinking. While we’ll dive much deeper into Boolean logic in the next lesson, I want to challenge you to deduce how queries might work. Linked reference filters are a lot more similar to queries than you might think.

Exercise: Answer these questions in writing

Answer the following questions in writing. Post your answers in this forum thread for today, and take some time to read the answers of others (especially if you had trouble grasping the concepts in this lesson).

  1. What is an outline structure?
  2. What purpose do links and tags have in queries?
  3. Why does the parent-child relationship between blocks matter in Logseq?
  4. How do only show blocks in the Linked References section that have a specific value?
  5. How do only show blocks in the Linked References section that do not have a specific value?

Next: the fundamentals of Boolean logic

Now that we’ve set our first steps with filtering based on links, we’ll start learning tomorrow about how to combine links in ever more complex combinations.

P.S. Missed yesterday’s lecture?

Yesterday over 100 sprinters tuned in live to get a crash course in queries and ask questions about the course. Watch the full replay on YouTube:

5 Likes
  1. What is an outline structure?

An outline structure is a hierarchy of sorts. It creates relationships between nested blocks and adds context to a given block in a given branch

  1. What purpose do links and tags have in queries?

Both links and tags structure the data in Logseq.

  1. Why does the parent-child relationship between blocks matter in Logseq?

It gives context to the child block[s].

  1. How do only show blocks in the Linked References section that have a specific value?

Use the filter option [funnel] to include (click on value) only those values which you want shown.

  1. How do only show blocks in the Linked References section that do not have a specific value?

Exclude them by shift-clicking the value in order to hide them from view.


This lesson was extremely helpful in laying a better foundational understanding of exactly how Logseq functions. While I’ve been using Logseq for several months now, I only had a vague understanding of these functions and their relationships to each other.

I know a few light bulbs finally came on for me while working through this lesson!

Thank you again, @Ramses!

1 Like

Logseq Queries course. [[Ramses Oudt]] posted Lesson 2. We are to answer these questions: #queries #logseq #people [[learning sprints]]

  1. What is an outline structure?
    • Outline structure is a hierarchical format that uses a parent-child construct (rendered as bullets and indents) to organize and group information into main-topic and sub-topic relationships.
  2. What purpose do links and tags have in queries?
    • Links and tags are anchors, or flags, that create logical relationships between disparate blocks of information that may or may not be physically (obviously) related based on proximity in the outline structure.
  3. Why does the parent-child relationship between blocks matter in Logseq?
    • The parent-child relationship between Logseq blocks allows for both linking of subtopics to main topics, and filtering for the purpose of searching.
  4. How do only show blocks in the Linked References section that have a specific value?
    • To show only the blocks with a specific value in the Linked References section of a page, open the filter and Click on the tag that you want to include (it will turn green). If you include more than one tag, they are OR’d. (As far as I can tell, there is no way to tell the filter to AND the tags; I assume you would need a query for that).
  5. How do only show blocks in the Linked References section that do not have a specific value?
    • To exclude blocks that contain a specific tag, open the filter and Shift+Click on the tag (it will turn red). As with the include filter, selections are OR’d. Also worth noting: if a block contains a tag that is both specifically included (green) and another tag that is specifically excluded (red), the exclude takes precedence, and the block will not show.
2 Likes

What is an outline structure
- An outline structure is a hierarchy of information
What purpose do link and tags have in queries?
- Links and tell the search function where to find specific information. It tells it that the information belongs to a group.
Why does the parent-child relationship between blocks matter in [[logseq]]?
- In Logseq links used in one block apply to all child blocks of that block, grouping them together.
How do you only show block in the Linked References that show a specific value?
- In the Linked References section you click or use tab and then enter on a value.
How do you only show clocks in the Linked References section that do not have a specific value?
- In the Linked References section you shift+click or use shift+enter on a value.

2 Likes
  • What is an outline structure?
    A hierarchical format that forms an organized block of information. When used with tabs it creates parent, sibling, child relationships
  • What purpose do links and tags have in queries?
    They are the pivot point from which queries are derived from. These enable search queries to produce results
  • Why does the parent-child relationship between blocks matter in Logseq?
    For filtering, querying will provide the insight to these relationships that are established
  • How do only show blocks in the Linked References section that have a specific value?
    by clicking on the filter you want
  • How do only show blocks in the Linked References section that do not have a specific value?
    and ‘right-clicking’ on the filter you don’t want

@Ramses - question for you:

On one of my tag pages, one of the linked references is a block from my journal page for today. The block has two child blocks, both of which (as expected) show up in the linked reference.

This happened, and I don’t understand why:

  1. When I first looked at the filter, there was another tag that is in a child block that didn’t appear on the list, while a tag in the other child block did.

  2. Since I’d recently written the block, I re-indexed to see if that would help, but it made no difference.

  3. I left for a while and came back an hour later, the tag that had been missing showed up in the filter list.

If the problem was an issue of updating, shouldn’t re-indexing have solved that, or is there something else time-related to be aware of regarding how this information is displayed**?**

Do you have any thoughts on that?

Re-indexing should solve the issue of link values not appearing in linked references or queries. However, since the latest release (0.8.2.) I’ve noticed some issues with the filter values so I’ve rolled back to 0.8.1. The engineers are looking into the issue, though.

I haven’t yet upgraded to 0.8.2, but since they are looking into the presence of this problem in that version, I’ll upgrade as soon as it’s available for my distro, then be patient until they fix it.

I’m wondering if I am seeing so many quirky things because I’m on Pop_OS. It seems like I’m seeing some issues that don’t appear to affect other Debian-based distros - at least as far as I can tell from the forums and GitHub issues. Maybe just the price I pay for being a stubborn weirdo with many quasi-esoteric preferences :roll_eyes: I shall try to be patient…

Thanks for the info on the problem!

1 Like
  1. What is an outline structure?

An outline structure is a list arranged to show a hierarchical relationship and is a type of tree structure. Every bullet point is either a parent, a child or both (except if it’s a stand-alone bullets). This makes it easy for you to add context to bullets and is very useful for drafting.

  1. What purpose do links and tags have in queries?

Links and tags have a completely equivalent function. They allow you to create relationships between different blocks and provide a way for you to intentionally search your database through queries.

  1. Why does the parent-child relationship between blocks matter in Logseq?

As mentioned in 1. the parent-child relationship gives context to blocks through the hierarchical structure. For example, you can break down a problem using sections (parent), subsections (parent and child), and subsubsections (child).

How do only show blocks in the Linked References section that have a specific value?

You can filter the linked references by choosing to include and exclude links

How do only show blocks in the Linked References section that do not have a specific value?

Exclude them by shift-clicking the value in order to hide them from view. As @LShark mentioned, it’s worth noting that if a block contains a tag that is both specifically included (green) and another tag that is specifically excluded (red), the exclude takes precedence, and the block will not show.

What is an outline structure?

A directed acyclic graph for humans, with relative ordering between branches

What purpose do links and tags have in queries?

They are the same from logseq’s perspective, though can have different connotations. They provide a kind of organizing reference that automatically collects anything that links to it, as well as providing a page to put extra reference information.

Why does the parent-child relationship between blocks matter in Logseq?

Child containment will include that information in queries that match on the parent, including inclusion in linked pages.

How does one only show blocks in the Linked References section that have a specific value?

Use an inclusion filter (find next to linked references, click on tags), or a query. Note that only links / tags will be available in the filter dialog.

How does on only show blocks in the Linked References section that do not have a specific value?

Use an exclusion filter (shift-click), or a query

  • What is an outline structure?
    • An outline structure is content organized by indenting and outdenting from coarse to granular, maintaining parent, child, and sibling relationships as items nest
  • What purpose do links and tags have in queries?
    • They create logical relationships between blocks of information stored in different places
  • Why does the parent-child relationship between blocks matter in Logseq?
    • Queries containing links and tags return all blocks, and thus all child blocks of those blocks, containing those links and tags
  • How do only show blocks in the Linked References section that have a specific value?
    • Use the filter and click on the tag you want to include
  • How do only show blocks in the Linked References section that do not have a specific value?
    • Use the filter and shift-click on the tag you want to exclude. Exclude takes precedence over include.

TIL Directed acyclic graph - Wikipedia thank you!

2 Likes
  • What is an outline structure?
    • An outline is a hierarchical structure that makes the layout of a document clearer
  • What purpose do links and tags have in queries?
    • Links and tags are an emphasis on text, especially for search engines
  • Why does the parent-child relationship between blocks matter in Logseq?
    • Child blocks can completely inherit the links and labels of their parents, which is not possible with text structures
  • How do only show blocks in the Linked References section that have a specific value?
    • Click; green
  • How do only show blocks in the Linked References section that do not have a specific value?
    • shift+click;红色

Answers Lesson 2

you get an outline structure by writing down your notes in branches. Branches are obtained by indenting.

Links and tags form search keys in queries.

A parent-child relationship is important because a child inherits the search keys from the parent.

Using a filter and including a filter value in the Linked Reference section results in a specific value.

You may also exclude filter values, so that the Linked Reference section does not contain those blocks.

Please don’t use this thread to ask unrelated questions. Instead, create a new post in the appropriate category.

1 Like

answer for exercise

  • What is an outline structure?
    • The minimum unit that constitutes logseq is a block. Outline structure in logseq combine each blocks by parent-child relation, and it achieved by indenting.
  • What purpose do links and tags have in queries?
    • The purpose is to point out explicitly the core words for searching.
  • Why does the parent-child relationship between blocks matter in Logseq?
    • This relationship makes the data hierarchy, and we can get all context in all the blocks in the branch. And We can see every child block inherits any links of its parent blocks
  • How do only show blocks in the Linked References section that have a specific value?
    • click the funnel icon → section list → Click the specific value.
  • How do only show blocks in the Linked References section that do not have a specific value?
    • click the funnel icon → section list → Shift + Click the specific value.

I have moved it, and I apologize for the derailment. I must say, though, that I am confused, because the reason I asked it here is because it is related. we are learning about queries, and I want to know if the “heading” status has any effect on how the hierarchy works.

In any case, I have moved it to the general forum questions category.

What is an outline structure?

  • An organization method that relies on hierarchy to structure information

What purpose do links and tags have in queries?

  • They serve as search terms

Why does the parent-child relationship between blocks matter in Logseq?

  • Children inherit parent block links

How do only show blocks in the Linked References section that have a specific value?

  • Click that value in the filter

How do only show blocks in the Linked References section that do not have a specific value?

  • Shift-click the values you don’t want included

Headings have no effect on hierarchy, only parent-child relationships. Otherwise I’d have pointed out headings in the lessons if they were important (which they’re not).

I hope this answers your question.