Book review: Apache Solr 4 Cookbook

As an author of an introductory Solr book, I have quite a bit of curiosity in how other books cover similar and more advanced material. So I was quite interested when Packt Publishing asked me to review one of their other Solr books: Apache Solr 4 Cookbook by Rafał Kuć.

Apache Solr 4 Cookbook is actually not a new book; even the second edition is exactly a year old (published in January 2013). As Solr has been moving rather quickly, things have changed between version 4.0 that the book covers and the version 4.6.1 that was just released. Several recipes became out of date, including new logging library requirements, library file name changes, and ongoing improvements for schema-less configuration. I would not be surprised if some of the examples do not quite work, though usually a quick search will fix it. Solr user mailing list is a good forum to get clarifications on possible changes and the book author is one of the participants. Also, author’s own website provides additional useful material, often on quite recent features of Solr.

The book is structured - and not just called - as a cookbook. There is a large number of small examples targeting specific use cases with instructions and explanations on how to achieve the goals. As each recipe is standalone, there is no sense of progression through the book. So it is not worth trying to read it in any particular sequence. Unfortunately, it also means that the issues are explored not in any great depth and they rely on pre-existing knowledge that the reader may or may not have. It also jumps between very basic topics and topics more suitable for high-intermediate readers. Therefore, I would strongly not recommend this book as a first book on Solr. There is a couple of other books on the market specifically targeting beginners and introducing material in an incremental fashion. Mine is one of them and I will be reviewing another one soon: Apache Solr Beginner’s Guide by Alfredo Serafini, also from Packt.

Despite the above listed shortcomings, the book does have some value. Skimming the table of content shows a number of issues people often run into. So, once somebody has acquired reasonable background knowledge of Solr, this book becomes a more valuable quick reference. Most of the same information exists in other sources, often for free; however the book provides complete mini examples with explanations. That’s often easier to understand than jumping between 4 or 5 pages of the online wiki and random blog posts.

In fact, the later chapters of the book have material that’s quite hard to find and distill. I particularly liked the chapters 6 (Improving Solr Performance), 8 (Using Additional Solr Functionalities) and - surprisingly - the appendix (Real-life Situations). I would recommend reading those chapters in-depth and trying to experiment with configurations provided in there.

I do wish the examples were more comprehensive, but that’s the limitation of printed books that every author struggles with. It’s just that it is a little hard to really understand boosting examples when experimenting on only two records. Perhaps the next edition could improve on that as a part of book marketing - provide shorter examples in the book and the longer examples online or as part of code download.

In summary, despite the book Apache Solr 4 Cookbook being somewhat uneven and out of date, it still has quite a bit of value as a reference for an intermediate Solr user. Just make sure you read something more introductory first.