A Session with Sherlock

In this section, we’ll take Sherlock for a test-drive. First we have to initialize Sherlock by fetching and analyzing data from the Erlang mailing lists archives. Once this is done, we’ll be able to query the data in various ways.

Fetching and Preprocessing the Data

Some of the commands in this section take a long time, so we do them only once. First we initialize the system.

 
1>​ sherlock:init().
 
Making ${HOME}/.sherlock/mails
 
sherlock_cache_created

This creates a directory structure under your home directory. It will fail if the environment variable HOME is not set. Sherlock stores all data in the directory structure under the ${HOME}/.sherlock top-level directory.

 
2>​ sherlock:fetch_index().
 
Written: /Users/joe/.sherlock/mails/questions.html ...

Get Programming Erlang, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.