Solr gotchas – core swapping

Apache Solr allows to swap two cores around for non-Cloud configurations. They take each other’s name, so it is a good way to push an updated core into a production without downtime. But an interesting question is how this is achieved. Normally, core name is it’s directory name too. So, does Solr rename the directory on the filesystem too? Not really! Instead name property in the core.properties file is updated to use the name of the other core.

Leanpub recipe: versioned book backups

Leanpub is a platform for publishing books that gives author control and tools beyond those available from traditional publishers. I used it to test an idea for a Solr Clients book and was able to validate its lack of traction without spending a cent.

One of the great features of Leanpub is that a book can be updated and the readers get notified of the new version. Consequently, it is sometime useful to keep the old versions around for the author and sometimes even for the readers.

This feature is not currently present in Leanpub, but we can add that with a bit of a glue from Zapier - web automation service. This is especially useful if you are using GitHub to edit your book with automatic preview and want a full end-to-end edit-preview experience without having to touch the Leanpub website.

Javadoc custom doclets – fun, frustration and forward motion

Javadoc is default - and often only - documentation for open source Java projects. It is generated automatically and can just be dumped on any public-facing server as a bunch of static files. Or even bundled with the distribution, if size is not an issue.

However, as project grows, several issues with using Javadoc documentation become apparent. The main issue is that Javadoc (yes, even JDK 8 one) uses frames and JavaScript for navigating the packages and classes. Which breaks any sort of direct linking to the content as well as discoverability by search engine. Yes, there are NO FRAMES links, but then the navigation becomes really cumbersome. The second issue is that generated Javadoc is using rather old HTML standards and is really not designed for Search Engine Optimization. Which means that search engines usually end up discovering random entry points following somebody’s old blog post.

Introduction to Apache Solr – presentation and code

I recently presented about Solr at Bangkok meetup group. There were about 40 people and I had great follow-up discussions afterwards.

As part of the presentation, I showed how Solr deals with Thai language. Even though my knowledge of Thai is fairly rudimentary, I dug into existing resources and found at least a couple of ways to process Thai language.