# How to Search by Title Only

Loving the app so far, thanks for all your hard work.

Apologies if this is somewhere here on this website but I must be using the wrong search terms.

Searching in The Archive shows all notes that hit in body or title. How do you search by title alone in the omnibar?

I'm imagining something like "title:searchterm" and variety of other delimiters

Also, is there a way to activate regex support for search? I can always use grep on the folder associated with the notes, but would nice to have this in the app itself.

I waste a lot of time browsing thorugh dozens of files or scrolling down a long list to get to files that had my search term in the title. Sometimes the results are not smart. Searching just now fur "URAS" (a student fellowship) turned up, in its first hit, a text with "Eurasian" but no separate word for URAS above a note that had simply the title "URAS" - I think it would make sense to have title hits always over content hits, and separate words hit higher over partial words. Hoping the search effectiveness will continue to improve in future versions.

• You didn't overlook anything: this is currently not possible. We're discussing this feature, but it's not rolled out, yet!

Author at Zettelkasten.de • https://christiantietze.de/

• @Will, I wonder if you might morph this KM to do basic title searching and then use The Archive (URL-scheme) to send us to the zettel we select.

@Will said:
Inset Note Link with 80 spacing a.k.a. How do you do that cool link per line formatting thing?
Keyboard Maestro macro

• edited February 2020

Zettel Title Search a.k.a. A simple unsophisticated text only (no regex) Keyboard Maestro macro for searching title names only and then displaying the note in the editor window.

The usual caveats. Change the path in the first action to the path of your Zettlekasten. Change the trigger to something that makes sense to you. This shouldn't break anything but who knows?

Use this Keyboard Maestro macro if you want to place a link inline.

Post edited by Will on

Will Simpson
I'm a futzing, second-guessing, backtracking, compulsive oversharing, ZK-maniac, in other words, your typical zettelnant.
Research areas: Attention Horizon, Productive Procrastination, Dzogchen, Non-fiction Creative Writing, Cognitive Workload, Python, Data Science
kestrelcreek.com

• @Will Perfect, thanks!

• @ctietze said:
You didn't overlook anything: this is currently not possible. We're discussing this feature, but it's not rolled out, yet!

Perhaps new search operators for use in the Omnibar TITLES to restrict the search expression to just titles text and NOTES for note text only. searches. A search might look like this:

(TITLES Thinking OR Insight) AND (NOTES #Status-Darft)

I think of the Omnibar as where clauses for a SQL Select statement and TITLES and NOTES as table names. I know folks like to omit the AND and use ! for NOT, but I tend to include them for readability. Sticking with the SQL metaphor:

(FROM TITLES Thinking OR Insight) AND (FROM NOTES #Status-Darft)

SQL is very powerful for having conversations with information. That Omnibar is an amazing example of this.

I realize sometimes, oftentimes, it is far easier to suggest than to implement.
Users with suggestions! 🤦🏻‍♂️

• The contender for this so far was title:thinking as a prefix, like kind:pdf in macOS Finder searches. But your use of parentheses makes me think about multi-word title searches. They would have to be written as title:(hello AND world) or title:hello AND title:world; your syntax makes a bit more intuitive sense. Noted!

Author at Zettelkasten.de • https://christiantietze.de/

• 👍

• Thanks to all of you for your response. @ctietze great to see that you are considering this. I have no strong preferences on the syntax but supporting one or more delimiters ( title: or content: for example) would be great. You could bypass the need for parentheses with use of a dumbed down regex title:hello*world and treat all supplied items separated by a space as an assumed "AND" unless an "OR" or "||" is present, for example.

In the meantime, @Will thanks for the KB macro. I modified it slightly as it was cutting off my longer search terms when you "get substring" and I wanted to make the macro automatically bring The Archive app to the front so I can search from any app. I uploaded the result here:

Modification of Will's Macro