Treat http: https: as reserved search operators

Use case or problem

I search my vault for URLs, but copy pasting from browser search bar into Obsidian search results in a string like http://www.blog.com/article/123. Because http: is treated like an unknown operator I need to manually type " before and after pasting the url in. More commonly, I forget that no results doesn’t mean the url is not in my vault and so recreate a note about the URL in question.

Proposed solution

http: and https: should be recognised as a common start to a url and be forbidden to be used as search operator names. Perhaps more generally ___:// could be recognised as likely to be a literal URL instead of an unknown operator and an empty regex.

If that feature is not feasible, a clearer indication that the search is not operating would contribute towards reducing friction, because currently there is no indication:

with http:

image

with ‘explain’ enabled:

image

without http:

Current workaround (optional)

I have to remember to expand the “explain search” window every time, to see that an error about an unknown operator has been raised. After that, I am prompted to remember to use double quotes or delete the colon to make the search a literal search.

Related feature requests (optional)

I found no feature requests for “search http” or “search url” but there are other forum posts about this situation.

Other users with the same problem

1 Like

Even more generally, it might be better to not treat unknown operators as special. There are only a handful of operators — why not match the whole things instead of causing problems every time a colon is searched? For example, someone just found that they couldn’t search Psalm 116:1 (Discord).

1 Like

100% supported to add a checkbox, toggle, setting, to the search, so that searching for URLs works as expected.

I got so confused when I couldn’t find my notes with some links.

I’d say the search should be just a plain simple exact match search, unless you turn on advanced features.

Related: Create Toggle / Option for Hotkey -> Basic Search <--> Advanced search because the new default is not so good