Elasticsearch C# NEST IndexMany Children

foreach (IEnumerable<object> batch in objects.Batch(1000))
            {
                var indexResponse = client.Bulk(s => s.IndexMany(batch,
                                         (bulkDescriptor, record) =>
                                           bulkDescriptor.Index("myindex").Parent(record.Id.ToString()).Document(record).Type("elasticchild").Id(record.Id.ToString())));

                Console.WriteLine(indexResponse);
            }

来源:https://stackoverflow.com/questions/39234432/elasticsearch-c-sharp-nest-indexmany-children
我的网站 http://www.a-du.net
原文地址:https://www.cnblogs.com/a-du/p/8137148.html