title: creating composite index (multiple fields) in mongoDB using java code
body: <pre><code>public void createCompositeIndex(MongoClient mongo) {
      Document index = new Document("id_click", 1).append("id_address", 1);
      MongoCollection&lt;Document&gt; collection = mongo.getDatabase("db").getCollection("Collection");
      collection.createIndex(index, new IndexOptions());
  }
  </code></pre>