💾 Archived View for gemini.panda-roux.dev › log › entry › 71 captured on 2023-06-14 at 13:43:36. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2023-05-24)
-=-=-=-=-=-=-
Posted on Wednesday March 1, 2023
gemini://library.inu.red
A while back I had set up a Gemini frontend for a mirror of The Anarchist Library. It lacked a few key features such as the ability to enter search queries. I lost the motivation to work on it for quite a while after I was disappointed with how it had turned out.
Over the last week or so I've spent about two dozen hours rebuilding the thing from the ground up to be more performant and feature-rich. It's written in C# using .NET 7, with MariaDB as the backing data store. The capsule now supports search queries that are evaluated against document metadata (title, notes, etc.), authors, and topics.
Part of the rebuild was implementing a parser for the AmuseWiki file format that The Anarchist Library stores its documents in. This way I no longer have to rely on pandoc, which is a behemoth in terms of resource usage. Rendering un-cached documents should be much quicker now, and won't crash the service on larger files.
One major hurdle was wrapping my head around MariaDB/MySQL's `FULLTEXT` index types. I'm not sure yet whether I want to try and implement content-level full-text indexing yet, as that will probably involve spinning up something like ElasticSearch. That is totally foreign to me, whereas SQL stuff I am comfortable with. These `FULLTEXT` indices enable textual searches across a number of fields with some degree of respect for natural language constructs (i.e. ignoring 'the', 'a', etc.). That's good enough for now I think.
There are still a few wrinkles to iron out, such as the /topics pages not normalizing topic names. If you try out that feature you'll see stuff like 'mutual aid' and 'Mutual Aid!' listed as separate topics unfortunately. I'm thinking about how to solve that.
As a courtesy to the bots, I've added a permanent redirect from `/file/abc.gmi` to `/document/abc`.
I'm excited to keep working on this. Any suggestions are welcome.
- panda-roux -