title: Can $in / $or queries use indexes?
body: <p>I'm playing with Mango queries on a CouchDB 2.0 instance, through the fantastic <a href="https://github.com/nolanlawson/pouchdb-find" rel="noreferrer">pouchdb-find</a>.</p>
  
  <p>A few times I got the dreaded <code>no matching index found, create an index to optimize query time</code> warning even though I <strong><em>was</em></strong> using indexed fields.</p>
  
  <p>Just now I got it when selecting <code>"type": {"$in": ["a", "b"]}</code> or the equivalent <code>"$or": [{"type": "a"}, {"type": "b"}]</code> , even though an index on <code>type</code> exists.</p>
  
  <p>Googling (<a href="https://docs.cloudant.com/cloudant_query.html" rel="noreferrer">cloudant query docs</a>, <a href="https://github.com/nolanlawson/pouchdb-find#api" rel="noreferrer">pouchdb-find docs</a>, <a href="https://stackoverflow.com/questions/38497985/pouchdb-find-why-is-my-index-not-used">SO question</a>) didn't help, and in the latter @nlawson says that some predicates (<code>$ne</code> in the aforementioned question, but maybe my <code>$in</code> / <code>$or</code> fall into the same basket?) <em>"currently do not use any index"</em>.</p>
  
  <ul>
  <li>If I'm indeed in the same boat, what does that mean? Is the impossibility to use indexes on queries using certain predicates a limitation of the <em>mango backend</em>, or a pouchdb one?</li>
  <li>Am I doing something wrong / is there an index workaround to avoid this?
  
  <ul>
  <li>More generally, is there documentation I could read to get a deeper grip on how indexes work and how to troubleshoot them?</li>
  </ul></li>
  </ul>
  
  <p>Thanks!</p>