The code populates some sample documents into a RAMDirectory and then invokes the various boosting and scoring example classes to demonstrate the results. RAMDirectory was chosen for the reason of convenience and keeping it lightweight without having to rely on files for ease of use.