Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OneNote plugin : improve finding notebooks, sections and page title #22153

Open
Fred-Vatin opened this issue Nov 18, 2022 · 2 comments
Open
Labels
Idea-Enhancement New feature or request on an existing product Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams Product-PowerToys Run Improved app launch PT Run (Win+R) Window Run-Plugin Things that relate with PowerToys Run's plugin interface

Comments

@Fred-Vatin
Copy link

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 string test first instead of rank up the page where the string is in the page name.


Improvement idea

  1. Always rank the results according to where the query is found. First in notebook name, next in section name, next in page title, then in page content.
  2. Allow syntax to filter results according to their type : notebook, section, page title, content
  3. Allow syntax to narrow search like a path but still being fuzzy.
    4. If I have multiple pages titled Test in different section and notebook, I’d like to find them according their location. Let’s say current location is Notebook: “Coding”, Section: “Powershell” I could type : c/ps#test to bring up this page as the first and probably only result matching this path.
  4. Add an option to open results in a new OneNote session because I often have one session already opened that I don’t want it to be replaced.

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&section-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

@$"{p.Notebook.Name}\{p.Section.Name}\{p.Name}"

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
  • if accessible ## any title in content

At 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 the page name.
And #page name/string to search any string in the page where name containing page name.

#page name could be in a fuzzy query to return result. To take up the earlier query example : c/ps#test for Notebook: “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 simplyps#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

@Fred-Vatin Fred-Vatin added the Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams label Nov 18, 2022
@htcfreek htcfreek added Idea-Enhancement New feature or request on an existing product Run-Plugin Things that relate with PowerToys Run's plugin interface Product-PowerToys Run Improved app launch PT Run (Win+R) Window labels Nov 20, 2022
@palenshus
Copy link
Contributor

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?

@Fred-Vatin
Copy link
Author

Unfortunately, not my specialty and no time right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Idea-Enhancement New feature or request on an existing product Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams Product-PowerToys Run Improved app launch PT Run (Win+R) Window Run-Plugin Things that relate with PowerToys Run's plugin interface
Projects
None yet
Development

No branches or pull requests

3 participants