title: How can I explain() an upsert in MongoDB to see if indexes are used?
body: <p>When code changes, a quick way that tells me if indexes are still proper for <code>find()</code> statements is (<code>nodejs</code>)</p>
  
  <pre><code>        collection.find(query).explain(function(err, explaination) {
              console.log('MongoDebug: ' + explaination.cursor);
          });
  </code></pre>
  
  <p>If the cursor is of type <code>BtreeCursor</code>, indexes are used.</p>
  
  <p>How do I check this when using <code>insert()</code> with <code>upsert: true</code>?</p>