Ability to Name / Rename starred searches

I am really loving the ability to star current searches in the insider build. I have multiple regex searches that I’ve setup to help me get around the vault. However, there is one basic problem. There is no way to name the search term. You need to spend some time decoding which regex does what. Having the ability to name starred searches would really make Obsidian a lot more powerful. For eg: I have a regex search where I can see all my todos, after starring it, if I rename it to Todo, it’ll quickly allow me to see all Tasks that are incomplete across all notes.

55 Likes

Essentially, we want saved searches.

1 Like

Well saved search is already there (in the new insider build V0.8.0) just need a way to rename it. Currently it saves it as the regex search term, which requires you to decode each term to understand what the saved search is for

1 Like

+1 for this! Another regex saved search user!

2 Likes

Today I found out I can star searches, so I’d like to suggest that we can name them or add a description somehow. Right now a starred regex search looks like this:

image

As time passes or more regex searches are starred, it might get confusing to know what a search does. This is also helpful for non-technical or inexperienced users that are not familiar with regex. Perhaps some of the most common searches can even be added by default, e.g. Searching for notes without links (orphaned notes)

Related to: Implement Saved Search concept

9 Likes

+1. Also, there’s a feature request for adding a button to Star Searches to the Search Panel here.

1 Like

I agree that adding the ability to name or title your searches would be very helpful, as having more than a few regexes get’s quite confusing to scan.

1 Like

Just as a note for people running into this right now, there’s a workaround in that you can write a true regex search and embed a name for your search.

/^- \[ \] | OPEN Todos
/^- \[x\] | COMPLETE Todos 

It’s kind of ugly and you need to figure out Regex which now you have 2 problems…
But it works

7 Likes

+1 for this. The starred items already have an icon beside them that show the user whether it is a saved note or a saved search, and so having names for saved searches isn’t going to be a concern when it comes to confusing either of the two. On the other hand, having no names for the saved searches would confuse the user what each of them does especially if there’s a good number of them, as stated from the previous posts here.

Perhaps having an additional option when right clicking a specific saved search would allow us to add a name or to rename it.

+1 for this. I would greatly help. When using Plugin release: Vantage - Advanced search builder I do not use regex frequently, so it takes ages to find the correct saved search again.

Possible current workaround/solution:
IMHO, this can be done by saving the search as embedded in correspondingly named file.
Then such search can be opened with quick switcher, can have aliases, can be annotated, …
Is there anything missing with such approach?

1 Like

One that I can think of is the ability to randomly open notes from search using the Smart Random Note plugin, though you can just easily copy and paste the string of text from the embedded search of the note. Still, I like to not have to do that every time I want to use the plugin for specific saved searches lol

Another workaround/solution:
Utilize url scheme (in html link or markdown link or …):

[search name](obsidian://search?vault=vault%20name&query=MOC)

References:

This will require to first open the file (which can be starred) and then click link within that file to execute the search.

keywords: custom protocol

Related feature request / plugin idea:

(more general) Use of url scheme could be complemented by some “redirect” plugin (to be requested/created) that searches YAML front-matter for “redirect” field and automatically opens it’s value and closes just opened file. This would be effectively implementation of “named searches” and many other features.

---
redirect: |
  obsidian://search?vault=vault%20name&query=MOC
---
# named search with annotation
This file will be accessed when "Redirect" plugin is disabled. 
Otherwise, attempt to open this file will lead to executing search.
1 Like

Use case or problem

Sometimes it is difficult to decipher what Saved searches mean - especially when it is in the form of a Regex equation, or when the query expression is long.

Here’s an example


Even the ‘Explain search term’ feature doesn’t help much
image

Proposed solution

This can be solved by having the ability to add Aliases to saved searches. This can also help in the case of query embeds.

Current workaround (optional)

Right now, I add manually tag to each page which appears in the search results.
ie, I add a #Query/so-and-so tag to each page.

But this is counterintuitive and tedious, given there isn’t a way to batch add (o remove or edit or nest) tags.

A Query or saved search is a kind of tag, I’ve felt; A Tag for untagged documents. (In fact, somebody from the discord wrote a query to find untagged notes! )
Having meaningful names for queries can save a lot of time!

4 Likes

Yeah I thought it got of this too and found your post. I would add this to the idea:

Prefix files with something unique like QESS (query embedded saved search) and then you can quickly pull up list of these saved search notes via Quick Open and typing the prefix (be super fast if you choose an obscure but easy to type ASCII character prefix).

e.g. QUESS Todos.md

Then you can add more than a name to your search as it’s a full note.

If Obsidian exposed its commands to OS shell we could make Keyboard Maestro macros to launch a specific QESS and toggle preview if it’s not already on… one day.

For whatever gets implemented for this, it would be useful if it could also be leveraged for the searches in the graph settings. Instead of having to type out the whole search for each element, you could specify the search you want with the alias.

4 Likes

I also want to add a related feature request to this and clicking tags works in general.

If we could append such URI starred searches:

or even tags by Ctrl + Left-Clicking, that would mean we could have a central note with all the frequent queries, which could then be compounded, i.e. the queries would be connected by the AND logical operator in the search bar.

Use Case

A particular use case where I would need this is Leetcode problems.
It would be useful to quickly Ctrl + Left-Click the following queries:

  1. tag:#leetcode/problem
  2. link:stack
  3. link:dynamic programming.

To find all problems matching the criteria.

I suppose my use case also depends on the following feature in regards to querying links:

3 Likes

+1 It will help and make search really usefull

Despite all the thoughtful workarounds suggested in this thread: the simple ability to name/ rename starred searches would be useful. I can live with the fact that the ‘star search’ is currently not found in the search function although would appreciate a copy of that button as an option in the search tab.

1 Like

Would love to see Dynalist’s rename bookmark feature to be ported across to Obsidian so that we can rename starred notes and searches.

image