My work just bought me a safari book shelf. The first thing I read was a shortcut called "Writing Efficient Ruby Code"[1](WERC). I liked that it explained how ruby is implemented. I have often wondered how ruby worked at the most basic levels. It also goes in to details about little things like the performance of double quotes vs single quotes. My practice is to always use double quotes which a coworker raised the question of the performance. According to WERC they are processed the same so there is no performance difference. In my own benchmarking found the same results as WERC for the in place editors (! methods), each methods and for loops, and the any? methods. Some notable parts the disk io including the image_tag helper in rails, faster blocks, how variables work, open classes vs mixins and using require in rails. It a quick read and most of it I was already practicing. One really cool feature is he talks about the differences in the ruby 1.9 code. I would suggest adding it to your bookshelf or picking up a digital copy if you use ruby in everyday life.
[1]Addison-Wesley Professional Ruby Series Writing Efficient Ruby Code by Dr. Stefan Kaes
[2] Stefan Kaes siteI just finished reading the Ferret shortcut[1] by David Balmain[2] on Safari. I knew what ferret did but have never researched apis or searching algorithms. This shortcut ranges from the most basic use of ferret to the more complex muti-indexing programs. There are two major parts to this book, Indexing and Searching. One can spend days in parts of ferret. Tweaking the indexing of data to get the best performance is just like profiling ruby code. The big take away for this part is best practices. If you are new to searching there are some good tips that will most likely become your common habits. I liked the detail level that David goes in to when talking about how ferret does its indexing. I can now say that I am proud to know what RCV1[3] is.
After learning about the different settings you have for indexing you are hit with about 15 different types of searches. Most searches are common sense, for example Term, Phrase, and Boolean. You will also learn about slop and the efficiency of using different query types. I am now very interested in the Ferret Query Language (FQL). The examples provided are clean, easy to read, and easy to understand. Although, the ferret ruby library provides an abstraction to the FQL, it is still good to know the FQL because not all queries can be easily created using the abstraction layer.
Overall if I needed to learn how to use ferret I would start here. This is a good reference with copy paste code examples that can get you up and going. It provides some best practices tips and an example on how to create an api for indexing different types of content which will most likely come in handy at some point if your ferret codings. I do not think this is a good book to learn the best way to create, fine tune and run a search engine. If there were more content I would like to see this published as an "up and running" type of book.
[1] Ferret shortcut
[2] David Balmain
[3] RCV1