Exemple #1
0
        public void CanHandleMultipleMissingDocumentsInMultipleIndexes()
        {
            using (var store = NewDocumentStore())
            {
                var indexDefinition = new EmailIndex().CreateIndexDefinition();

                for (int i = 0; i < 4; i++)
                {
                    store.DatabaseCommands.PutIndex("email" + i, indexDefinition);
                }

                using (var session = store.OpenSession())
                {
                    session.Store(entity: new EmailDocument {
                    });
                    session.Store(entity: new EmailDocument {
                    });
                    session.SaveChanges();
                }

                WaitForIndexing(store, timeout: TimeSpan.FromSeconds(10));
            }
        }
Exemple #2
0
        public void CanHandleMultipleMissingDocumentsInMultipleIndexes()
        {
            using (var store = GetDocumentStore())
            {
                var indexDefinition = new EmailIndex().CreateIndexDefinition();

                for (int i = 0; i < 4; i++)
                {
                    indexDefinition.Name = "email" + i;
                    store.Maintenance.Send(new PutIndexesOperation(new [] { indexDefinition }));
                }

                using (var session = store.OpenSession())
                {
                    session.Store(entity: new EmailDocument {
                    });
                    session.Store(entity: new EmailDocument {
                    });
                    session.SaveChanges();
                }

                WaitForIndexing(store, timeout: TimeSpan.FromSeconds(10));
            }
        }