About Sherlock


Sherlock aims to continue the precendent set by ElasticSearch: work out of the box with minimal configuration and provide a simple interface.

Sherlock's API uses a "Fluid" interface that relies heavily on method chaining and type hinting for brevity. The developer should never need to stop and look up a class name to instantiate, or dig through docs to remember which class accepts which arguments.

Secondary to the interface comes developer sanity for anyone working on Sherlock: reduce code as much as possible. Rather than write a million getter/setter functions to expose ElasticSearch's various parameters, Sherlock relies heavily upon templates, auto-generated class stubs, magic methods and PHPdoc.

Project Motivations

Sherlock was built because the author perceived a lack of PHP clients that focussed on the interface being simple and clean. This isn't to say that other clients are bad, simply that there is room for clients that emphasize different aspects.

About the Author

Sherlock was designed and programmed by Zachary Tong (@ZacharyTong on Twitter). Zach has been using ElasticSearch since late 2011, built the SegmentSpy plugin for ElasticSearch and runs Elastomer, a hosted ElasticSearch solution.