Convenient search for nested-tag

Use case or problem

I use nested-tags organize my notes, but it’s hard to search.

For example, I have a tag ‘#Apple/iPhone’, when I just want to search this tag, I have to type the whole ‘#Apple/iPhone’, the same case in this link below.

How to search by part of nested tag

I know I can use regex to solve this, like ‘/#.*iPhone/’, but it’s convenient.

Proposed solution

I think maybe we can do some improvement to nested-tag search, just type ‘#iPhone’, it can get the same search result as ‘#Apple/iPhone’.

4 Likes

Great request! In addition to your link, this was also somewhat discussed in this thread: View Structure of Nested Tags on Graph

I am not saying there is a good solution. I just wanted to provide the link for reference.

Thanks!

1 Like

Why not search for "/iphone"?

(It does work in local tests.)

1 Like

Good idea!
but it will increase mind pressure, before search u should know whether the tags belong first-level tag or nested tag

1 Like

And I test it , if I search ‘/iphone’, the result will include 'iphone ’

1 Like

Searching with double quotation marks to get an exact match?

"/iphone"

it’s ok, but not convenient.

1 Like

I think this sounds dangerous, as I’m thinking there should be a reason why you used those nested tags in the first place, and one such reason could be specificity. In some cases you maybe wanted to distinguish between #apple/iphone, and #cases/iphone, or …

The point I’m trying to make is that nullifying the levels like that would break some nested tag schemes, for sure.

It would be better, if moving forward with something like this, to have similar but different syntax for searching for nested tag levels. Maybe something like “#/phone” or “#*phone”.

1 Like

I think maybe there is another way to solve this: Auto Complete in search.

Just like type tag in document, when type ‘#’, it will automatically display relevant tag.

This way won’t disturb the search logic, and will be convenient to search, not only for nested -tags.

1 Like

Link to this.