zadam / trilium

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

[require] enhance find function. #2021

Open leeyaunlong opened 3 years ago

leeyaunlong commented 3 years ago

I find a chrome find like electron-find code at github. https://github.com/TheoXiong/electron-find/blob/master/README.md @zadam can you enhance current global-find function with this code?

joaoguariglia commented 3 years ago

Would it be possible to do a quick search like that? This would be perfect, as if it were a search equal to google or equal to outline(project)

image

zadam commented 3 years ago

Hi @leeyaunlong , Trilium actually uses this exact library. But it sucks in many ways. Fortunately CKEditor is (finally) implementing Find (& Replace) plugin in their current iteration and I plan to integrate it once it's available, thus replacing electron-find.

@joaoguariglia even though search is mostly happening in-memory, this would be probably too slow for the planned number of notes (100 000 notes). It's of course still possible to implement this using special data structures (tries etc.) but this would also mean a split in the search algorithms (fast & simple vs. slow & powerful). So I'm not really planning to go in this direction.

joaoguariglia commented 3 years ago

ok ok, thanks for the quick feedback, your product is the best one I've tested, and I've tested it a lot :)

leeyaunlong commented 3 years ago

Hi @leeyaunlong , Trilium actually uses this exact library. But it sucks in many ways. Fortunately CKEditor is (finally) implementing Find (& Replace) plugin in their current iteration and I plan to integrate it once it's available, thus replacing electron-find.

@joaoguariglia even though search is mostly happening in-memory, this would be probably too slow for the planned number of notes (100 000 notes). It's of course still possible to implement this using special data structures (tries etc.) but this would also mean a split in the search algorithms (fast & simple vs. slow & powerful). So I'm not really planning to go in this direction.

It's good news. everytime , I want to find some word in current tab, but the global search alway search full trilium UI page. If the ckeditor find plugin will integrate , it's great things.

antoniotejada commented 2 years ago

Try #2806 as a less sucky ctrl+f substitute.