Allow querying for search terms across list items (Search operator similar to section:() but for lists... search within a single list OR parent list item and its children list items)

Use case or problem

Similar to the section:() search operator to have a list:() operator that basically will search within the same markdown list.

Additionally add something like list-children:() where it would only search within the hierarchy of a list item and its children / sub bullets. Similar to how the “show more context” of a search result / backlink will show all of a list items children with it, it would only be searching those items. So basically it would search the contents of the results that show up in the “Show more context” where a parent shows all its children.

  • So I could have the following in a note (below) and if I searched “list:(stuff client abc proposal)” it would NOT match any results because “stuff” was not within the second list with “client abc” and “proposal”.
  • But if I changed the search to remove “stuff” and just have “list:(client abc proposal)” it would show as successful and show the results.
  • Lastly, if I changed it to use list-children:() and searched “list-children:(client abc proposal)” it would NOT match results because “proposal” is under “client xyz” and not under “client abc” parent list item.
* List 1
    * Some stuff in the first list.

Some other things between.

* List 2
* ***Client abc***
    * Met to talk about last week's meeting
* Client xyz
    * talked about the ***proposal*** with them

The “Show more context” option is great for search results and how if the result is a bullet/list item that it shows all its children bullets. Basically want a couple List specific search operators that would leverage that hierarchy that is already being tracked and used in the metadatacache.

Proposed solution

See above. The solution is proposed within the use case / problem section.