Replacing elastica with elasticsearch