Add Search functionality to the API

This change includes functionality to parse the search API parameters, build a search DSL and perform the search against elasticsearch.
Using Indexes[0] here seems like layer-breaking. Indexes should be unexported and we could use s.Index throughout, setting it in SetUpTest as it's intended to be used, I think.