Separated Elasticsearch and DB actions, fixes #320