My intention is to cache the structure of the org files in a database to facilitate faster and more complex searching. Although that potentially may be premature optimisation just to provide access to searching of the contents of a note. The Scheme query may be more complex to implement as it would either involve passing over the notes content for each item to be queried (simple) or to determine if the query is going to look at the notes in order to only pass over the notes where necessary (more complicated). I'll need to experiment to see whether it is going to work acceptably well.
For the people using org-mode for note-taking+TODO tracking, this feature is handy!
I suppose you may decide on some lazy-evaluation mechanism whereby the notes content of a given headline is not fetched until the first time it is needed. So then for typical use it won't matter much if searching the notes is an expensive operation. And a user may decide to build a less expensive search query by prepending search tags that do not depend on the notes content.
I notice that this feature has been implemented in the 3.4.0 (159) TestFlight release! Simply fantabulous! Thank you so much! This is worth a very large tip -- which I'll be sure to do from my older iPhone that does not use the TestFlight version of BeOrg, since AFAIK in-app purchases from TestFlight don't result in real payment.
Just one suggestion: it would be handy if from the Files tab search bar one could (with suitable prefixes) do all sorts of searches. So if I type "n tolstoy" at the Files tab search bar, a search shows all items in all files whose notes contain the word "tolstoy". This would be helpful to me because I tend to leave the Tasks tab configured to "Pinned Files" for quick display, but when I want to search, I typically want to search all notes (or better yet all notes and headlines) in all files.
To be honest I should have implemented this sooner. Having tried the simple approach with a reasonable sized set of files it worked fine without any unnecessary optimisation. There isn't yet Scheme support however for notes search but I will take a look at adding this soon.
I need to look at improving search on the files tab as you suggest - I shall have a think about how this can best be approached.
(Yes, you are correct in-app purchases on TestFlight don't result in any actual money - thanks for your support!)
Would you be willing to add an "item-notes" helper function to library.org, so that custom scheme filters can select items based on contents of the items' notes (a.k.a. underneath text)? I tend to store large quantities of reference information in the form of text and plain lists beneath my orgmode headlines (a.k.a. items), so it would be useful to me to be able to match items (headlines) based on such content.
Similarly, it would also be handy to add to your list of single-letter search syntax tags an "n" tag. So then if the search text is "n knuth n sorting" then an item would match if its notes (a.k.a. underneath) text contains both the word "knuth" and the word "sorting".
Since searching the entire text/notes of an item may be expensive, it seems sensible that the notes would only be searched if an "n" tag is present. Also, one can probably keep searches quick by using the "n" tag in conjunction with other faster tags, for example "f personal n knuth n sorting" to search for a headline/item in "personal.org" whose notes/text contains the words "knuth" and "sorting".
3 people like this idea