 <p>on namespace Corpus.$cmd failed: ns doesn't exist</p> <p>It means you don't have collection named 'tweets' or 'via_count' in Corpus.</p> <p>Not like a raw query in mongodb, map_reduce function doesn't make a new collection if it's not exist.</p>