Purpose of Index in Mongoose Schema
<p>I am trying to add unique documents in the collection. However the problem is I want to decide uniqueness based on 2 fields. So I found a solution for it online. What confuses me is, What is the purpose of<code>INDEX</code> here? In RDBMS index is usually the word used for row id, what does this mean here and how does it affect the uniqueness?</p>

<pre><code>var patientSchema = mongoose.Schema({
  name : String,
  fatherOrHusbandName : String,
  address : String,
});


patientSchema .***index***({ email: 1, sweepstakes_id: 1 }, { unique: true });
</code></pre>