示例#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);
            }
        }
示例#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);
            }
        }