code: private void createIdIndex(String bucketName)
      {
          Bucket bucket = null;
          try
          {
              bucket = CouchbaseBucketUtils.openBucket(cluster, bucketName, csmd.getBucketProperty("bucket.password"));
  
              /*
               * Ignoring if indexes pre-exist
               */
  
              bucket.bucketManager().createN1qlPrimaryIndex(buildIndexName(bucketName), true, false);
  
              LOGGER.debug("Niql primary Index are created for bucket [" + bucketName + "].");
          }
          catch (CouchbaseException cex)
          {
              LOGGER.error("Not able to create Niql primary index for bucket [" + bucketName + "].", cex);
              throw new KunderaException("Not able to create Niql primary index for bucket [" + bucketName + "].", cex);
          }
  
          finally
          {
              CouchbaseBucketUtils.closeBucket(bucket);
          }
  
      }
docs: Creates the id index.
  
  @param bucketName
  the bucket name