We’ve been working hard behind the scenes on some major updates for SuttaCentral, and we’re finally ready to roll them out. You should see the changes soon! What’s it all about?
First thing is, these are meant to be unobtrusive upgrades: they don’t affect the main functions on the site, just make things better.
instant search
The biggest improvement from a user point of view is the instant search. This is a turbocharged search using the awesome Oramasearch library. It took us a lot of experimenting to find a good solution, but we’re super-happy with Orama.
The idea is that it will cover a large number of people’s most common needs, and the database search will handle the rest.
Open up the search and an overlay dialogue appears, start searching and it’ll immediately populate the results from sutta titles and IDs. This gives you a new and snappy way to get to that sutta even faster and hence get enlightened even faster! Hopefully!
If you want to just search for the word, just hit enter or click the search item as usual and the normal search results appear. You also have the option to limit your search to early Buddhist suttas. (This and many other filter options are listed in the “filter” dialogue on the search result page.)
Tip: use
in:ebs
filter to restrict search to “early Buddhist suttas”,in:ebt
for “early Buddhist texts” including the Vinaya.
I asked Oramasearch developers to support fuzzy matching for Pali/Sanskrit diacriticals, and they went ahead and did it! Open source is so awesome. (This feature is being tested, it’ll roll out soon.)
There are of course some limitations.
- instantsearch does not search full text, just titles and IDs
- when first opened it’ll take a few seconds to warm up: it’s downloading the data. (we do it this way out of respect for your bandwidth: you only download data when you have indicated you want to search.)
- it is restricted to early Buddhist suttas (not Vinaya, Abhidhamma, or late parts of the Khuddaka)
We will be fine tuning this over the next few weeks, and in future will experiment with adding limited full text search.
Technical note: How instant search works is, you have a javascript library in the browser that does the searching (orama). Then you download the data into the browser. That’s why it’s instant: there’s no round call to the database as with a normal search query. The cost is, you have to download all the data up front. Currently, with just titles and IDs, it’s not too much. But if we add the texts, it’ll be a few MB. As a guess, if we add the translated text for the early suttas, it’ll be about 2 MB or so. That’s quite a lot, but bear in mind the average page size is on the internet is several megabytes. Now, most of that weight is video, images, trackers, ads, and the like. So 2 MB amortized over the whole app is not prohibitive. But then there are questions of browser performance, mobiles, and so on. Anyway, we’ll test this in coming months.
better breadcrumbs
We’ve tweaked the breadcrumbs. It’s trickier than it looks! Now:
- the main icons at the top (Home, search, and menu) are always visible
- if the breadcrumbs are too wide for the screen, you’ll see the last one on the right so you know where you are.
- you can scroll back to anywhere along the line.
m3 styling
We’ve also updated the styles to fit the newer m3 version of Google’s material design. We don’t really follow material design strictly, but we do take some cues from it, like rounder corners, warmer colors, and so on. Overall, the look is softer and more consistent. But nothing really dramatic.
material web
We’ve also updated our dependencies to use the latest material web components from Google. We don’t use many dependencies, just a few things like the menu, some checkboxes, things like that. You won’t really notice these changes too much, just that the styling has been tweaked a little.
next steps
Now we want to keep on evolving the search. There are a bunch of improvements to the main search that we are looking forward to. Search is basically a bunch of tiny tiny things that add up to it working well or not. It takes time!
As mentioned above, I’d also like to see if we can include full text search in the instantseach. We might also add some abilities to customize it, but we’ll see how it’s used first.