Update search for grep and/or non-word characters
I'm using GFM todo lists in some of my notes, and it would be great to be able to search my notes to find incomplete tasks ("- [ ]"). However, currently this search yields no results. Saw on another thread that "punctuation" is not indexed, and I'm wondering if this extends to all non-word characters? I'd love to be able to override this in settings and/or use grep.
-
nvUltra indexes files using an approach that results in compact indexes for rapid search without having to scan each file at the time of searching, but it does not allow arbitrary regexp searching. (In fact, the indexes are tuned on a per file basis to try and minimize unnecessary space while allowing fast search and the file comparison functionality to show similar files.)
1. Using Spotlight for search is a no-go. Spotlight searching is unfortunately not one of Apple's most reliable tools. And sadly, it's not obvious when it fails since it doesn't show matches that it failed to find. I've had especially poor reliability with Spotlight on iOS, and I want a consistent way of searching across devices.
2. Repeatedly scanning files would allow arbitrarily complex searches, but would result in unnecessarily high disk access.
3. Reading the contents of every file into memory solves #2, but is worse in terms of memory use. This would likely be especially problematic on iOS devices.
4. Which leaves indexing of some sort, which to my understanding and the best of my researching ability, means limiting the flexibility of search in some ways.
5. I agree with you that grep/regexp are wonderful tools, and I use them frequently in Sublime Text for example. But nvUltra has a different focus than those applications.
If anyone has pointers to some good indexing libraries that would be suitable for my technical requirements, I am happy to consider other options.
0 -
So, I'm not a coder, but nvALT could do this—so why can't nvUltra?
0 -
Notational Velocity/nvALT stores the entire contents of every file in memory. For most users with relatively small collections of small notes (which is the approach recommended by Zachary Schneirov for Notational Velocity), the memory hit for this is not a big deal, especially when used on macOS computers (the overhead of the built-in GUI tools are much higher than even a relatively large collection of text files).
However, I want something that does not require storing all documents in memory in order to improve memory efficiency. Especially since I want a compatible library that provides consistent behavior in a variety of circumstances (iOS devices which suffer more memory pressure than macOS), and even for some possible command line utilities. In addition, the core functionality can be compiled for any "normal" OS (including Windows and Linux) -- the GUI would have to be completely rewritten for any other OS however. The performance of search using this library is O(n) in terms of number of documents to search, but provides a fixed time to search each document, regardless of length. If the index is cached, the files only need to be indexed when first added, or when they change.
Additionally, the indexing allows comparing documents to each other for similarity, which allows nvUltra to show files similar to the selected document -- something nvAlt cannot do.
0 -
I think I can follow your logic here, but to me it seems like pretty significant trade-offs are being made when search is so central to the nvUltra identity. I've used apps with correlation before—DevonThink is particularly good at this—but even when it's good, to me it's not better than really robust search.
That said, I tried my search in another file-based writing environment (iaWriter using iCloud Drive) and it also failed, so my guess is that this approach is pretty common and necessary in non-database apps. So it's all good. I understand not every feature request can make the cut!
0
Please sign in to leave a comment.
Comments
4 comments