Open SR-- opened 3 years ago
I would like to see the proposed enhancements, especially with note lookup also matching within note descriptions and tags!
I'd also like to add extra considerations for enhancing search.
vscode full text search has limitations
One can use vscode search, which is very good but requires searching twice.
I think the Lookup feature should go as far as searching front-matter and tags, but perhaps full-text is too much? Unless it was implied full-text only for the markdown note files dendron recognizes / processes and not all text in the workspace.
Automatically doing vscode full-text search could run into some performance issues if large attachments/assets happen to be included in the workspace, and although this should be negligible in most cases, probably not a good default to use/trigger from the lookup feature. vscode did work a few years ago to multi-process search, but it's not an indexed search and probably the reason it doesn't support fuzzy logic with the explorer full text file search.
fuzzy search
I'd like to add that if dendron supported fuzzy logic for searching notes, that would be great. While vscode file search can apply regular expressions, using re to implement NOT, AND and OR logic is not an intuitive task. However, indexing the note content is a non-trivial task. Technically, using file timestamps and a cache could help maintaining an index and avoid reindexing every time a workspace was opened.
I note that Zettlr does implement search a lot better than Dendron. See: https://docs.zettlr.com/en/core/search/. It supports search queries much like a search engine would allowing AND (implicit, space between keywords), OR (|
), NOT (!
) and exact match (""
quoted) operators. This is obviously more intuitive for most. I don't think it goes as far as doing proper stemming (https://en.wikipedia.org/wiki/Stemming) however. But still better than what Dendron and vscode offers.
As a powerful workaround to most note apps having limited full-text search features, I use a desktop search engine instead. E.g. recoll https://www.lesbonscomptes.com/recoll/ might not have the most modern UI, but it's got a powerful query language, similar to what you'd find with search engines, including Elasticsearch. The search syntax (https://www.lesbonscomptes.com/recoll/usermanual/webhelp/docs/RCL.SEARCH.LANG.SYNTAX.html) lets you do advanced searches and it's built on top of Xapian (https://xapian.org/features):
While it's probably not a good idea to try replicate full desktop search engine features in dendron, perhaps dendron can try do at least some basic in-memroy fuzzy search match logic for note lookups.
Linking a related issue:
Please Select if your Request is Either something new or an Enhancement
Please select the area your request applys to. (Multiple selections are Possible)
Is your feature request related to a problem? Please describe
[suggestion] Search functionality. I might enter a concept as a heading or as a child note, this is a constant tension. If I try to find it, I have to search twice, in the Lookup and if not found, in the vscode search, possibly in vain as I might not have entered this concept at all. It would be better and faster if Lookup could trigger the full-text search, for example if the search term is not found, or upon user request via a key press, etc.
Describe the solution you'd like
Not 100% sure. This is a possible sequence:
as steps, or as a categorised list in results?
Describe alternatives you've considered
One can use vscode search, which is very good but requires searching twice.
Additional context
https://discord.com/channels/717965437182410783/739186036495876126/879372292587651122 https://discord.com/channels/717965437182410783/735365126227493004/919513734832074803