Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Text (source code) search engine with indexer and a front end web interface to search. Uses Python 2.6+
Python C++ C CSS Shell Smarty Other
Latest commit dc2d8b6 @cbess - cleanup code
Failed to load latest commit information.
core - cleanup code
setup refactor to support yaml config loading; updated settings…
tests - cleanup tests
webapp - cleanup code
.gitignore - refactor settings to support yaml config
LICENSE.txt updated webapp output; added license (CDDL) Update refactor to support yaml config loading; updated settings…
example.local_settings.yml - refactor settings to support yaml config refactor to support yaml config loading; updated settings…

Text Sherlock (or Sherlock or TS)

Provides an easy to install and use search engine for text but, mostly for source code. OpenGrok requires to much time to install (though it may be worth it for some). Sherlock will give you a much easier setup, a text indexer, and a web app interface for searching.

Basic Setup


  1. Download sherlock source from GitHub.
  2. Extract/place the sherlock source code in the desired (install) directory. This will be where sherlock lives.
  3. Run sh to setup an isolated environment and download core packages.
  4. Configure settings. The defaults in provide documentation for each setting.
    • Copy example.local_settings.yml to local_settings.yml.
    • Override/copy any setting from to local_settings.yml (change the values as needed). All YAML keys/options must be lowercase.
  5. Run source sherlock_env/bin/activate to enter the virtual environment.
  6. Run python --index update or --index rebuild to index the path specified in the settings. Watch indexing output.
  7. Run python --runserver to start the web server.
  8. Go to http://localhost:7777 to access the web interface. Uses the twitter bootstrap for its UI.

You may need to install some packages before a Ubuntu installation will run without error.

  • Install curl: sudo apt-get install curl
  • Install uuid libs: sudo apt-get install uuid-dev
  • Install python dev: sudo apt-get install python-dev


  • Settings/Configuration
    • See for details.
  • Setup script (read contents of script for more information)
    • Run to perform an isolated installation.
  • Main controller script
    • Run -h for more information.
  • End-to-end interface
    • Indexing and searching text (source code). Built-in support for whoosh or xapian.
      • Easily extend indexing or searching via custom backends.
    • Front end web app served using werkzeug or cherrypy.
      • werkzeug is for development to small traffic.
      • cherrypy is a high-speed, production ready, thread pooled, generic HTTP server.
    • Settings and configuration using Python.

Web Interface


Append to document URL.

  • To highlight lines, append to URL: &hl=3,7,12-14,21
  • To jump to a line, append to end of URL: #line-3



Using other backends

  • Change the default_indexer and default_searcher values to match the name given to the backend.
    • Possbile values:
      • whoosh the default, no extra work needed.
      • xapian must be installed separately using the included setup/ setup script.

Using other web servers

  • Text Sherlock has built-in support for werkzeug and cherrypy WSGI compliant servers.
  • Change the server_type value to one of the available server types.
    • Possible values:
      • default, werkzeug web server (default).
      • cherrypy, production ready web server.

Core packages

Requires Python 2.6 or later.

Other References

Project Goals

  1. Provide an easy to setup and adequate text search engine solution.
  2. Be a respectable alternative to OpenGrok.
  3. Influence the authors of OpenGrok to provide a simpler setup process.
    • I successfully setup two installations on CentOS and Ubuntu 11.x and each time it took more than two hours. TS setup takes less than 10 minutes (excluding package download time).
Something went wrong with that request. Please try again.