Possible operator:
- scope:line
- scope:innermost-block // useful when nested blocks are recognized
- scope:block
- scope:innermost-chapter
- scope:h6-chapter
- …
- scope:h1-chapter
- scope:chapter
- scope:file // this is default now
Restricting scope at higher levels is already done by “path” and “file” operators:
- path:“folder1/folder2” // restricts search to content of relative path like search in Windows File Explorer.
- path:"/folder1/folder2/file3.md" // like above but restricted to one file
- file:“file3.md”
But that is rather in another sense, matched terms still have to occur within the same file so “scope:file” is currently the upper limit for the scope.
Reference: https://publish.obsidian.md/help/Plugins/Search
Ability to nest “scope” operator in groups is desirable.
For example: “(term1 term2 scope:line) term3
” to match line with term1 and term2 only in the files which contain also term3 anywhere.
scope:line
would work also for table rows (like database records, although not distinguishing fields/columns)
EDIT: Partial implementation is now promissed in posts #30 and #33.
Another helpful behavior in this pursuit would be option to rank/sort search results based on closeness of keywords in the match.