code: private View openIndex(int flags, boolean dryRun) throws ForestException {
          if (_view == null) {
              // Flags:
              if (_dbStore.getAutoCompact())
                  flags |= Database.AutoCompact;
  
              // Encryption:
              SymmetricKey encryptionKey = _dbStore.getEncryptionKey();
              int enAlgorithm = Database.NoEncryption;
              byte[] enKey = null;
              if (encryptionKey != null) {
                  enAlgorithm = Database.AES256Encryption;
                  enKey = encryptionKey.getKey();
              }
  
              _view = new View(_dbStore.forest, _path, flags, enAlgorithm, enKey, name,
                      dryRun ? "0" : delegate.getMapVersion());
              if (dryRun) {
                  closeIndex();
              }
          }
          return _view;
      }
docs: Opens the index, specifying ForestDB database flags
  in CBLView.m
  - (MapReduceIndex*) openIndexWithOptions: (Database::openFlags)options