码迷,mamicode.com
首页 > Windows程序 > 详细

Elasticsearch C# NEST IndexMany Children

时间:2017-12-28 19:47:17      阅读:389      评论:0      收藏:0      [点我收藏+]

标签:document   arp   flow   tor   elastic   search   tostring   desc   nes   

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

Elasticsearch C# NEST IndexMany Children

标签:document   arp   flow   tor   elastic   search   tostring   desc   nes   

原文地址:https://www.cnblogs.com/a-du/p/8137148.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!