search-api: major refactoring of api.
Merge pull request #26 from nribeka/refactoring

search-api: major refactoring of api.