Outliner Software Forum RSS Feed Forum Posts Feed

Subscribe by Email

CRIMP Defined


Tip Jar

Useful outliner search/query examples

< Next Topic | Back to topic list | Previous Topic >

Pages:  1 2 3 > 

Posted by Jesse Grosjean
Sep 19, 2023 at 10:16 PM


I need to design a query language for my outliner.

Before I get too deep into that I want to survey the best of what’s already out there.

Please suggest:

1. Your favorite outliners to search in?
2. What specifically you find useful?
3. Are there features that you don’t find that useful and just confuse you?
4. What’s missing? What do you want to do with your outline queries that you can?



Posted by Amontillado
Sep 20, 2023 at 02:46 AM


One of the reasons I don’t play well with Obsidian is Dataview. It’s very popular and useful, but it suffers from fragility. I remember spending several sessions trying to get an example query to work. The problem was a required space at the end of a line, not something visible in posted examples.

It sounds like you’ve got plans for something unusual. I look forward to seeing Bike’s evolution.

I should revisit Obsidian and see if I’m more compatible. It’s changed. I’ve changed. Like a fare in Harry Chapin’s Taxi, there might be hope for one more one night stand.


Posted by Jesse Grosjean
Sep 20, 2023 at 12:33 PM


> It sounds like you’ve got plans for something unusual. I look forward to seeing Bike’s evolution.

My starting point is TaskPaper’s query language (which uses xpath model and syntax as starting point):

- https://guide.taskpaper.com/reference/searches/

One thing TaskPaper does to make searches shorter and more friendly is that it allows you to skip syntax and it will provide a default search behavior. For example if you want to search your entire outline for the text “Inbox” then you just type “Inbox”.

But when you type “Inbox” you are leaving out many aspects that are needed for a hierarchical search. What TaskPaper does is fill in default values for the unspecified parts. For example “Inbox” is expanded to: //@text contains[i] “Inbox”. All of the following searches expand to that same underlying search:

@text Inbox
contains Inbox
@text contains Inbox
//@text contains[i] “Inbox”

More example searches and expanded forms:

Find any item that does not have @done attribute:
search: not @done
expanded: //not @done

Find any item that has both @due and @today attributes
search: @due and @today
expanded: //@due and @today

Find any item that is a project and that contains text “Inbox”
search: project Inbox
expanded: //@type = “project” and @text contains[I] “Inbox”

Find first item in each project that doesn’t have @done attribute (next actions)
search: project *//not @done[0]
expanded: //@type = project//not @done[0]

Generally I like this design, but it can get complex. I think part of the complexity is just boolean logic combined hierarchical logic, I don’t think there’s a way around that if you want the search to be powerful enough to address any scenario. Another source of confusion is the expansions. The make simple searches much easier, but they can make it hard to go deeper and see what other options you might have.

At the moment I my plan is to keep this basic design, but then provide more tooling for understanding and composing searches.

Generally that tooling will be a separate UI where:

1. You type your search
2. Below your search you see fully expanded version of your search
3. See a table view of your entire outline with matches rows highlighted
4. If you select a range if your search the view (expanded search, and matched results) will update based on selected range.

This all seems pretty good to me. But before I dive in too far I’m interested to hear what others actually use and like.


Posted by Lucas
Sep 20, 2023 at 03:09 PM


As far as outliner searching, the main feature I look for is the ability to save searches and, ideally, save them as something along the lines of “smart folders”,  so that I can simply click on a smart folder and see the results, rather than selecting a saved search from a drop-down list. For me, this makes outliners much more pleasant to work with.

I also really liked the way Mori had “tag folders”, including the feature that you could add items directly to a tag folder and the items would receive that tag.

Another nice-to-have feature is the ability to display results either in hierarchical view or in a sortable “flat view”.

Finally, it’s great to be able to search and sort by date created and date modified, although that requires a “database” approach that might not fit with Bike.


Posted by Paul Korm
Sep 20, 2023 at 08:35 PM


Features I find very useful

* Regular expression searching
* Type-to-replace highlighted search results (useful in conjunction with regex-based search)
* Search and replace across multiple documents


Pages:  1 2 3 > 

Back to topic list