public SideBySide() { #region side_by_side_3 using (var store = new DocumentStore { Url = "http://localhost:8080/", DefaultDatabase = "Northwind" }) { store.Initialize(); // This method will create 'ReplacementOf/Orders/ByCompany' index, which will replace 'Orders/ByCompany' when // - new index will become non-stale // - new index will reach at least '01000000-0000-000E-0000-000000000293' etag // - in 6 hours from the deployment date store.SideBySideExecuteIndex(new Orders_ByCompany(), Etag.Parse("01000000-0000-000E-0000-000000000293"), DateTime.UtcNow.AddHours(6)); } #endregion using (var store = new DocumentStore()) { #region side_by_side_4 // This method will create 'ReplacementOf/Orders/ByCompany' index, which will replace 'Orders/ByCompany' when // - new index will become non-stale // - new index will reach at least '01000000-0000-000E-0000-000000000293' etag // - in 6 hours from the deployment date new Orders_ByCompany().SideBySideExecute(store.DatabaseCommands, store.Conventions, Etag.Parse("01000000-0000-000E-0000-000000000293"), DateTime.UtcNow.AddHours(6)); #endregion } }