using System; using System.Threading.Tasks; using Couchbase; using Couchbase.Management.Query; namespace TestCreatePrimaryIndex_deleteme { class Program { static async Task Main(string[] args) { var cluster = await Cluster.ConnectAsync( "couchbase://localhost", "Administrator", "password"); var manager = cluster.QueryIndexes; await manager.CreatePrimaryIndexAsync("matt", new CreatePrimaryQueryIndexOptions() .Deferred(false) .IgnoreIfExists(true)); Console.WriteLine("No error yet..."); Console.ReadLine(); await manager.CreatePrimaryIndexAsync("matt", new CreatePrimaryQueryIndexOptions() .Deferred(false) .IgnoreIfExists(true)); await cluster.DisposeAsync(); } } }