@@ -184,9 +184,9 @@ public partial interface ISearchClient
184
184
/// <param name="options">Add extra http header or query parameters to Algolia.</param>
185
185
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
186
186
/// <typeparam name="T"></typeparam>
187
- List < BatchResponse > SaveObjectsAsync < T > ( string indexName , IEnumerable < T > objects , RequestOptions options = null , CancellationToken cancellationToken = default ) where T : class ;
187
+ Task < List < BatchResponse > > SaveObjectsAsync < T > ( string indexName , IEnumerable < T > objects , RequestOptions options , CancellationToken cancellationToken = default ) where T : class ;
188
188
/// <inheritdoc cref="SaveObjectsAsync{T}(string, IEnumerable{T}, RequestOptions, CancellationToken)"/>
189
- List < BatchResponse > SaveObjects < T > ( string indexName , IEnumerable < T > objects , RequestOptions options = null , CancellationToken cancellationToken = default ) where T : class ;
189
+ List < BatchResponse > SaveObjects < T > ( string indexName , IEnumerable < T > objects , RequestOptions options , CancellationToken cancellationToken = default ) where T : class ;
190
190
191
191
/// <summary>
192
192
/// Helper: Deletes every records for the given objectIDs. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objectIDs in it.
@@ -609,17 +609,17 @@ public async Task<List<BatchResponse>> SaveObjectsAsync<T>(string indexName, IEn
609
609
public List < BatchResponse > SaveObjects < T > ( string indexName , IEnumerable < T > objects , bool waitForTasks = false , int batchSize = 1000 , RequestOptions options = null ,
610
610
CancellationToken cancellationToken = default ) where T : class =>
611
611
AsyncHelper . RunSync ( ( ) => SaveObjectsAsync ( indexName , objects , waitForTasks , batchSize , options , cancellationToken ) ) ;
612
-
612
+
613
613
/// <inheritdoc/>
614
614
public async Task < List < BatchResponse > > SaveObjectsAsync < T > ( string indexName , IEnumerable < T > objects ,
615
- RequestOptions options = null ,
615
+ RequestOptions options ,
616
616
CancellationToken cancellationToken = default ) where T : class
617
617
{
618
- return await ChunkedBatchAsync ( indexName , objects , Action . AddObject , false , 1000 , options , cancellationToken ) . ConfigureAwait ( false ) ;
618
+ return await SaveObjectsAsync ( indexName , objects , false , 1000 , options , cancellationToken ) . ConfigureAwait ( false ) ;
619
619
}
620
620
621
621
/// <inheritdoc/>
622
- public List < BatchResponse > SaveObjects < T > ( string indexName , IEnumerable < T > objects , RequestOptions options = null ,
622
+ public List < BatchResponse > SaveObjects < T > ( string indexName , IEnumerable < T > objects , RequestOptions options ,
623
623
CancellationToken cancellationToken = default ) where T : class =>
624
624
AsyncHelper . RunSync ( ( ) => SaveObjectsAsync ( indexName , objects , options , cancellationToken ) ) ;
625
625
0 commit comments