zadam / trilium

Build your personal knowledge base with Trilium Notes
GNU Affero General Public License v3.0
27.41k stars 1.93k forks source link

Public Link with Search or Advanced Search Options for Entire TREE [Trilium Server] #4816

Open mangoose20026 opened 4 months ago

mangoose20026 commented 4 months ago

Describe feature

Public Link with Search or Advanced Search Options for Entire TREE [Trilium Server]

The public link generated for shared notes (Entire TREE) in Trilium do not inherently include advanced search functionalities. The shared view primarily allows for browsing through the notes and their content. Users can navigate through the hierarchy, but they might not have access to advanced search features unless they are using the full application with appropriate permissions.

Either Search and Advanced search is needed or there should be someway to have guest or read-only credentials with search and advanced search for shared user

Additional Information

Basically provide advanced search and search for entire tree collection to public or anyone to read them

zerebos commented 4 months ago

I added a search API for share pages in #4298 but the default share template has not been updated to make use of it yet. I am working with Zadam to integrate a new default share template that will use it. However if you want to have searching before that's integrated you can implement it yourself via share templates.

If you're interested in that method, you can see it in action here: https://trilium.rocks. It's a website entirely run by Trilium's share feature using a custom share template that includes several features the current default share template does not most relevantly, search. The implementation of the template and the corresponding JavaScript can be found in the repo (https://github.com/rauenzi/trilium.rocks) for the website, and if you just want to use that template directly, I have an article on it here: https://trilium.rocks/xecUJ8eL3pvM

mangoose20026 commented 4 months ago

@rauenzi Awesome...Please integrate it . However still misses the following

a. full context search with type ahead with number of matches b. navigation of search results with arrows/button

please import few text files in app.simplenote.com and do a search with a keyword and you will come to know about the highlighting, search results, arrows. please lookup docfetcher to see type-ahead with no of matches (score) while typing

example of both the screenshot for your kind reference with navigation

first - simplenote

image

second -- docfetcher

https://raw.githubusercontent.com/xiaoniu-578fa6bff964d005/docfetcher/type-ahead/dev/screenshots/type-ahead-search.gif