Obsidian and Johnny Decimal Index Searches27 Nov 2022
I have been using Obsidian as my personal knowledge management app of choice now for a few years, and recently I have been modifying one of my note vaults to a new indexing system. However, I stumbled across an interesting search issue with the indexing that required a bit of investigation to resolve.
A Bit About Obsidian
Before I take a look at the issue I needed to address, I thought it might be useful to take a few moments to set out a little bit of information about Obsidian.
Obsidian is a cross-platform knowledge management tool. It works as an overlay to a folder structure containing note files in Markdown format, and provides a number of standard features to help you work with and cross-reference your notes, as well as many optional and third party features available as plugins.
The app debuted in 2020 and I began using it later that year after looking for an alternative to Evernote, trying Roam Research, and finding it wasn’t quite the right for for me. Since then, I have slowly been building up my vaults (Obsidian’s name for separate folders of notes and app settings) across a few distinct areas, and it has revolutionised the way I deal with notes.
A New Index - Johnny Decimal
Early in 2022 I came across the proposals of Johnny Decimal. It was an approach to adding a numerical index system to note folders and I saw a lot of other note takers using it. I had seen indexing systems used over the years in a similar vein, and obviously there is good academic rigour to the principles of indexing (Dewey Decimal anyone?). After reading things through, I figured it would be worth investing some time to trying it out. Being able to quickly reference sections of my vault and notes within those sections using indices is something that should let me jump to the right level much faster than my previous non-indexed approach.
The basic premise of the system is as follows:
- Break “everything” down into ten buckets and divide each bucket up into ten parts. That gives you up to 100 parts in total and these are assigned a unique two digit index (00-99).
- Each of these can then contain a further set of indexed folders (again indexed from 00-99). This gives you folders potentially indexed between 00.00 and 99.99 (00.00, 00.01, 00.02, … 00.98, 00.99, … 99.00, 99.01, … 99.98, 99.99).
There is a little more to it than that, and I would encourage you to read through the Johnny Decimal website and forum to get further insights on how you could structure your index, how to maintain it, how to deal with projects, etc.
Gradually over the course of three or four months I went through sketching out different ideas for applying the Johnny Decimal system to my ‘main’ vault. Eventually, I came up with an approach I was happy to start with and that should be aligned to the sorts of future needs I expect to have. Most people seem to come up with their indexes within a few days or weeks, but this was very much a background task for me, and one that I didn’t want to rush; hence I spent months on it.
The big push to switch started just before I took a new professional role (and yes, I am one of those Obsidian users who pays for a commercial license), and I began the slow progression of reorganising the thousands of notes in my vault while also rapidly adding new notes to my vault as I began my new role. This is actually something that is still ongoing and I hope to complete by the end of the year as I also want to merge in some (but not all) other vaults that I have been cultivating.
Indexed Searching in Obsidian via the Quick Switcher
Obsidian includes a core plugin called Quick Switcher in the settings.
This plugin enables access (e.g. through
CTRL + O (Windows)/
CMD + O (Mac)) to a prompt that allows you to enter a string of text and run a “fuzzy” match against the names (or aliases) of notes in the vault. You can even use it to create a note with a particular name.
For the purposes of this post, I have created an Obsidian vault that I have populated with some example notes. In the screenshot below, you can see the Quick Switcher results when I enter the Johnny Decimal index of
02.01. It nicely filters and matches the list of files to those in the folder shown in the file explorer (another core plugin) on the left.
Sometimes, the search brings in some additional content, but the desired note appears at the top of the list. Great.
In this second search, you can see the
01.02 is not being matched as a consecutive sequence of characters for all the matches. This is where the “fuzzy” matching comes into effect. It can be a useful feature if you say remember a few keywords for finding the name of your note.
However, it is worth nothing it does still apply an ordering to the search text, so it isn’t any sort of intelligent agent or a substitute for good naming conventions. This was actually one of my reasons for wanting to adopt Johnny Decimal - to help me constrain my searches more effectively.
As long as my Johnny Decimal searches end up ordered to the top of my list then everything is good.
Why is it the Platypus always an exception?
Unfortunately, as the above search shows, continuous sequential matches of the characters in the search do not always rise to the top of the search, and the Quick Switcher plugin does not (currently) contain any settings to tailor the behaviour. When I first discovered this I was deflated to say the least. I realised that over time the impact this was going to have on my use of the Johnny Decimal system in Obsidian was only going to grow.
Quick Switcher Alternatives
I realised that the issue was the “fuzzy” matching, and while it can be useful, I needed a way to override it.
I had a search online through the Obsidian and Johnny Decimal forums, and across the wider Internet of discussion, but I could not find anyone discussing a way to work around this inconvenience.
As a second step, I decided to take a look at the community plugins for Obsidian and see if I could find any Johnny Decimal plugins or alternatives to Quick Switcher, that might give me the exact matching I was looking for. While I did not discover any Johnny Decimal plugins, I did find a couple of alternatives for Quick Switcher that I decided to run some comparisons with.
|Search||Quick Switcher||Quick Switcher++||Another Quick Switcher †|
|11.03||Listed the only result from that folder||Listed the only result from that folder||Listed the only result from that folder|
|02.01||Listed the two results from that folder||Listed the two results from that folder||Listed the two results from that folder|
|01.02||Listed several results with exact match at top||Listed several results with exact match at top||Listed only the exact match from that folder|
|11.01||Listed several results with exact match second||Listed several results with exact match second||Listed only the exact match from that folder|
† I used the predefined file search for the test.
Having read through the plugin details first, I wasn’t entirely surprised by these results and mainly I was just happy to have discovered a plugin that would let me carry out exact match searches rather than fuzzy searches. In addition, I could have this installed alongside the core quick switcher and just have different hot keys assigned to them, enabling me to carry out different flavours of search.
If you want to try out the tests for yourself, remember you can download the vault (including plugins):
The inbuilt Quick Switcher tries to be a little too clever for use with a Johnny Decimal system, leading it to prioritise undesired results - something you would naturally want to avoid in your workflow. Fortunately, Obsidian’s thriving ecosystem of community plugins comes to the rescue with Another Quick Switcher, allowing you to forego “fuzzy” matching and precisely match a search term in a note’s file name. I would highly recommend giving Another Quick Switcher, Johnny Decimal, and Obsidian a try. The combination seems very promising to me and I hope that it can be to you too.