Implement general and elastic-search's design

It closes #18