In search or graph view pane, line:(text [[link]]) or section:(text [[link]]) operators do not work

Steps to reproduce

  1. Have a note with text and [[link]] in the same line.
  2. Search or filter in the graph view using line:(text [[link]]) or section:(text [[link]]) search operator.
  3. Empty search or filter results.

Did you follow the troubleshooting guide? [Y]

Expected result

Not empty search result.

Actual result

Empty search result. Note that searching for "[[link]]" does work, but it does not answers to the usecase described here, where we do need to search for notes containing both text and [[link]] in a given line or section.

EDIT :

More context : I’ve not yet converted all my notes to Properties, I’m still using inline fields. In this usecase, I need to filter notes containing a given field (e.g. : field:: ) and a given value for that field (a value which is a link, e.g. : [[link]] ). Hence the need for line:(field:: [[link]]) or section:(field:: [[link]]) search operators, which are currently not supported by Obsidian. But Zachatoo (on Obsidian Discord) found a great workaround by using the following regex : /field::.*\[\[link\]\]/ which completely does the trick ^^

Environment

SYSTEM INFO:
Obsidian version: v1.7.6
Installer version: v1.6.7
Operating system: Windows 11 Home 10.0.22631
Login status: not logged in
Language: en
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none

This has nothing to do with line or section. It happens even without them.

The problem is that [ is reserved keyword for searching properties.

You need to write line:(text "[[link]]")

Also this

1 Like

Thank you, surrounding problematic characters by " indeed solves this issue.

For this usecase, `line:("field:: “[[link]]”) is the solution.