I have wanted this feature in almost every text based tool I have ever used, and only ever got something like it to work properly in emacs org-mode in a limited fashion. Sometimes, even for those apps where “pre-defined filters” or “stored searches” can be created, there just isn’t enough room in the interface and it gets messy real quick.

Placing a search as a link in a text file itself would be awesome, and puts the power back in the hands of the end user again.

Most wikis support this kind of includable search results. So in my point it is not a very special function, but I agree it would be very nice to have in obsidian. To automatically keep MOC’s updated for example …

Any many other options like … todo-list

… it would be special to me :wink:

2 Likes

What about not requiring another syntax for searching?

  • [[foo]] will be a link to a page if the page with that exact title exists.
  • it will lead to searching for foo otherwise (like “Search in all files”)

Similarly for trascluded links/searches.

Or, if you would like to be more explicit, let’s say to start searching with ?, so [[foo]] for page foo and [[?foo]] for searhing foo.

2 Likes

In some tools and wikis, the sidebar is just a page.

So why not extend the File sidebar with the note .sidebar.md, and you can put anything you want there?

1 Like

I am not sure your answer helps exactly, although I understand what you mean - as a space saving device, sure, using a file in the sidebar is a great idea.

I believe this thread is talking about creating a way to embed searches (and all their wonderful combinations of search syntax) as a link. A static page in the sidebar will still not be able to do this unless Obsidian recognises how to interpret those “search links”.

This is a really cool idea. I would love to check my unfinished tasks every day as a transcluded search result in my Daily note.

1 Like

Not exactly the functionality that you described. But i think this tool can solve your problem

1 Like

I recommend combining search URLs with existing transclusion and formatting metaphors.

I understand (I hope correctly) that search URLs are coming which would look something like this:

[My Search](obsidian://search?vault=myvault&q=my+search+term)

Clicking that link would initiate a search in Obsidian.

Perhaps we could transclude that search just like any other link, by putting a ! in front of it.

![My Search](obsidian://search?vault=myvault&q=my+search+term)

When the page is rendered, that link would render as a list of matching notes.

And even better, perhaps we could apply some formatting using a similar syntax we now have for images:

![My Search|columns=3](obsidian://search?vault=myvault&q=my+search+term)

4 Likes

This would be extremely useful to me! I use a lot of ‘fake’ typed links like “- subset [[topic]]” or “- hasTopic [[topic]]”, and I would use this on the topic itself to automatically list eg all papers with that topic :slight_smile:
Glad to see more people think this is nice!

1 Like

+1, but would see it simply as a macro. Something like {{search: … }} using the same functionally as the search box, and yes, using | to then separate display settings for the query. I prefer this approach because it also provides a mechanism for plugins to extend on top of ie. {{plugin-name: …}}. Obsidian then provides the string inside the macro to the plugin, and renders the content it gets back.

1 Like

Use case or problem

Brief: Embed search results in a note as a list of links, which will then update in the future, as well as reflect in links on the graph.

Detailed: I’m finding the ability to copy and paste search results a great way to “automatically” populate index notes (or, Maps of Content). Additionally, using the OR function in search is also a great way to capture aliases terms for notes - for example the results of (CDC OR “Centers for Disease Control”) could go into the single CDC MOC.

One shortcoming to this approach, however, is that the MOC will only be current on the day I manually do this process; it will gradually fall out of date as I add more sources, notes, etc until I manually update again.

I’d like if I could define a search term, either in line in the note or by embedding a saved search, which then will update the list of results as I add and update notes elsewhere in my vault.

Proposed solution

Embed a named, saved search; alternatively, define the embedded search within the note, similar to {{date:YY-MM-DD}} function in templates, e.g.:
{{search:(CDC OR “Centers for Disease Control”) (path:“Sources”), sort:created DESC}}
And after this the note would populate a matching list of links.

I guess if I have many of these live/smart indices it could bog down Obsidian with a very large vault, but perhaps this could be resolved by only updating embedded search results with a prompt/command.

Current workaround

I create a saved search, such as (CDC OR “Centers for Disease Control”) (path:“Sources”), sort its results, and then use the “Copy Search Results” function to manually move the list of Wikilinks into the desired note e.g. CDC. Within that note I have a line above the results with the search term and date so I know how to reproduce and when in the future.

I organize my notes into a “Notes” and “Sources” folder; if this were automatic, I imagine including a list of references in most notes via two embedded searches in a ## Related Notes and ## Related Sources section at the end.

Related feature requests (optional)


6 Likes

I like the ideas that everyone is including here. Makes me wonder to what extent Obsidian can make end-user programming more available in the future.

1 Like

Good thinking!
Exists in Atlassian.
Would indeed be a good one ++1 :wink:

1 Like

++1 Really looking forward to this feature

1 Like

Anyone know where we are on this feature?

closer than before.

3 Likes

I take this to mean “it’s being worked on”, and that’s all I need to know :heart: Loving your work, Obs devs! :laughing:

2 Likes

Agreed. Much love to the team that is making this possible!

1 Like

This will be implemented in 0.10.2

12 Likes