Ejemplo n.º 1
0
        public void CreateNewIndexAndMappingForNestedNullListOfChild()
        {
            var mappingTestsParent = new MappingTestsParentWithListNull
            {
                Calls = 3,
                MappingTestsParentId = 3
            };

            using (
                var context = new ElasticsearchContext(ConnectionString,
                                                       new ElasticsearchSerializerConfiguration(_elasticsearchMappingResolver)))
            {
                context.TraceProvider = new ConsoleTraceProvider();
                context.AddUpdateDocument(mappingTestsParent, mappingTestsParent.MappingTestsParentId);
                context.SaveChangesAndInitMappings();

                Thread.Sleep(1500);
                var doc = context.GetDocument <MappingTestsParentWithListNull>(mappingTestsParent.MappingTestsParentId);

                Assert.NotNull(doc);
            }
        }
Ejemplo n.º 2
0
        public void CreateNewIndexAndMappingForNestedNullListOfChild()
        {
            var mappingTestsParent = new MappingTestsParentWithListNull
            {
                Calls = 3,
                MappingTestsParentId = 3
            };

            using (
                var context = new ElasticsearchContext(ConnectionString,
                    new ElasticsearchSerializerConfiguration(_elasticsearchMappingResolver)))
            {
                context.TraceProvider = new ConsoleTraceProvider();
                context.AddUpdateDocument(mappingTestsParent, mappingTestsParent.MappingTestsParentId);
                context.SaveChangesAndInitMappings();

                Thread.Sleep(1500);
                var doc = context.GetDocument<MappingTestsParentWithListNull>(mappingTestsParent.MappingTestsParentId);

                Assert.IsNotNull(doc);
            }
        }