@@ -80,7 +80,7 @@ public async Task Build(BuildContext context)
8080 if ( colMapping . TryGetValue ( itemKey , out string mapping ) )
8181 {
8282 itemKey = mapping ;
83- }
83+ }
8484 }
8585 newItem . Add ( itemKey , item . Value ) ;
8686 }
@@ -90,16 +90,15 @@ public async Task Build(BuildContext context)
9090 #endregion
9191 #region BatchInsert
9292 var esClient = GetElasticClient ( esOptions ) ;
93- var indexExResp = await esClient . IndexExistsAsync ( esOptions . Index ) ;
93+ var indexExResp = await esClient . Indices . ExistsAsync ( esOptions . Index ) ;
9494 if ( ! indexExResp . Exists )
9595 {
96- var createIndexResp = await esClient . CreateIndexAsync ( esOptions . Index ) ;
96+ var createIndexResp = await esClient . Indices . CreateAsync ( esOptions . Index ) ;
9797 }
98- var esSyncResp = await esClient . BulkAsync ( ( bulkRequest ) =>
99- {
100- var bulkReqDesc = bulkRequest
101- . Index ( esOptions . Index )
102- . Type ( esOptions . TypeName ) ;
98+ var esSyncResp = await esClient . BulkAsync ( ( bulkRequest ) => {
99+ var bulkReqDesc = bulkRequest
100+ . Index ( esOptions . Index ) ;
101+ // .Type(esOptions.TypeName);
103102 if ( context . Build . Parameters . Value ( ID_MAPPING , out string es_id ) )
104103 {
105104 return bulkReqDesc . IndexMany ( dataSource . TransformData , ( bulkIdxDesc , item ) =>
@@ -150,7 +149,7 @@ private IElasticClient GetElasticClient(ESOptions esOptions)
150149 Uri node = new Uri ( esOptions . Host ) ;
151150 ConnectionSettings settings = new ConnectionSettings ( node ) ;
152151 settings . DefaultIndex ( esOptions . Index ) ;
153- settings . DefaultTypeName ( esOptions . TypeName ) ;
152+ // settings.DefaultTypeName(esOptions.TypeName);
154153 #region Auth
155154 if ( ! String . IsNullOrEmpty ( esOptions . UserName ) )
156155 {
0 commit comments