Open Fred-Vatin opened 2 years ago
I just came here to file a similar issue, to get notebook/section titles to show up in search. I like your idea of sorting them based on the hierarchical relevance as well. That could be implemented pretty easily. Is that something you want to tackle?
Unfortunately, not my specialty and no time right now.
Description of the new feature / enhancement
Current behavior
Currently, it seems running the query in the page content and prioritize those results. This fails to bring up a relevant result.
Examples
If I have a section named
MS Office
searching for this exact string will return only pages containing this string and not the section itself. It feels strange.Same if I have this time a page named
Test
, it will bring up every page containing the stringtest
first instead of rank up the page where the string is in the page name.Improvement idea
Test
in different section and notebook, I’d like to find them according their location. Let’s say current location isNotebook: “Coding”
,Section: “Powershell”
I could type :c/ps#test
to bring up this page as the first and probably only result matching this path.How this last feature could work
Idea 1
As soon as the plugin detects a slash
/
or backslash\
or a#
in the search, it should infer that strings on the left and right of it are in hierarchical relation and#
as prefix always to a page title. If it doesn’t find any title. It search for content with this string.Every page has a path like :
onenote:https://d.docs.live.net/some_id/Documents/Notebook/Section%20Title.one#Page Title§ion-id={some-guid}&page-id={some-other-guid}&end
Maybe it could be used as a schema. It seems the plugin can access the page location with
Idea 2
A syntax to filter results according to their type. Any idea welcome. Here is mine.
#n:
for Notebook#s:
for section#
for page name##
any title in contentAt least, the
#
for page name should be the most useful on a daily case to narrow the results to only a few easy to scan.Most of the query could be like
#page name
to search for page name containing thepage name
. And#page name/string
to search anystring
in the page where name containingpage name
.#page name
could be in a fuzzy query to return result. To take up the earlier query example :c/ps#test
forNotebook: “Coding”
,Section: “Powershell”,
Page: “Test”I could instead make a query like
#n:c/#s:ps/#test. I don’t like it very much but may be easier to implement than the simple
c/ps#testor simply
ps#test` because not most of the time it will be enough to get exactly the page we want.Scenario when this would be used?
Get the very notebook or section or note we want to jump into just by passing a prefix.
Supporting information
No response