Ejemplo n.º 1
0
 /// <inheritdoc />
 public Task <IDeleteResponse> DeleteByQueryAsync(IDeleteByQueryRequest deleteByQueryRequest)
 {
     return(this.DispatchAsync <IDeleteByQueryRequest, DeleteByQueryRequestParameters, DeleteResponse, IDeleteResponse>(
                deleteByQueryRequest,
                (p, d) => this.RawDispatch.DeleteByQueryDispatchAsync <DeleteResponse>(p, d)
                ));
 }
Ejemplo n.º 2
0
 /// <inheritdoc />
 public IDeleteResponse DeleteByQuery(IDeleteByQueryRequest deleteByQueryRequest)
 {
     return(this.Dispatch <IDeleteByQueryRequest, DeleteByQueryRequestParameters, DeleteResponse>(
                deleteByQueryRequest,
                (p, d) => this.RawDispatch.DeleteByQueryDispatch <DeleteResponse>(p, d)
                ));
 }
Ejemplo n.º 3
0
 /// <inheritdoc />
 public Task <IDeleteByQueryResponse> DeleteByQueryAsync(IDeleteByQueryRequest request,
                                                         CancellationToken cancellationToken = default(CancellationToken)
                                                         ) =>
 Dispatcher.DispatchAsync <IDeleteByQueryRequest, DeleteByQueryRequestParameters, DeleteByQueryResponse, IDeleteByQueryResponse>(
     ForceConfiguration <IDeleteByQueryRequest, DeleteByQueryRequestParameters>(request, c => c.AllowedStatusCodes = new[] { -1 }),
     cancellationToken,
     LowLevelDispatch.DeleteByQueryDispatchAsync <DeleteByQueryResponse>
     );
 /// <summary>
 /// 初始化query
 /// </summary>
 /// <param name="searchRequest"></param>
 /// <param name="predicate"></param>
 public static IDeleteByQueryRequest InitDelteQueryContainer(this IDeleteByQueryRequest searchRequest, IPredicate predicate)
 {
     if (predicate != null)
     {
         searchRequest.Query = predicate.GetQuery(searchRequest.Query);
     }
     return(searchRequest);
 }
Ejemplo n.º 5
0
 /// <inheritdoc />
 public IDeleteByQueryResponse DeleteByQuery(IDeleteByQueryRequest request) =>
 Dispatcher.Dispatch <IDeleteByQueryRequest, DeleteByQueryRequestParameters, DeleteByQueryResponse>(
     ForceConfiguration <IDeleteByQueryRequest, DeleteByQueryRequestParameters>(request, c => c.AllowedStatusCodes = new[] { -1 }),
     LowLevelDispatch.DeleteByQueryDispatch <DeleteByQueryResponse>
     );
Ejemplo n.º 6
0
 public static void Update(ElasticsearchPathInfo <DeleteByQueryRequestParameters> pathInfo, IDeleteByQueryRequest request)
 {
     pathInfo.HttpMethod = PathInfoHttpMethod.DELETE;
     //query works a bit different in that if all types and all indices are specified the root
     //needs to be /_all/_query not just /_query
     if (pathInfo.Index.IsNullOrEmpty() && pathInfo.Type.IsNullOrEmpty() &&
         request.AllIndices.GetValueOrDefault(false) &&
         request.AllTypes.GetValueOrDefault(false))
     {
         pathInfo.Index = "_all";
     }
 }
 public Task <DeleteByQueryResponse> DeleteByQueryAsync(IDeleteByQueryRequest request, CancellationToken ct = new CancellationToken())
 {
     throw new NotImplementedException();
 }
 public DeleteByQueryResponse DeleteByQuery(IDeleteByQueryRequest request)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 9
0
 /// <inheritdoc/>
 public Task <IDeleteByQueryResponse> DeleteByQueryAsync(IDeleteByQueryRequest request) =>
 this.Dispatcher.DispatchAsync <IDeleteByQueryRequest, DeleteByQueryRequestParameters, DeleteByQueryResponse, IDeleteByQueryResponse>(
     request,
     this.LowLevelDispatch.DeleteByQueryDispatchAsync <DeleteByQueryResponse>
     );
Ejemplo n.º 10
0
 /// <inheritdoc/>
 public IDeleteByQueryResponse DeleteByQuery(IDeleteByQueryRequest request) =>
 this.Dispatcher.Dispatch <IDeleteByQueryRequest, DeleteByQueryRequestParameters, DeleteByQueryResponse>(
     request,
     this.LowLevelDispatch.DeleteByQueryDispatch <DeleteByQueryResponse>
     );
 public void DeleteByQuery <T>(IDeleteByQueryRequest <T> deleteByQuerySelector) where T : class
 {
     _client.DeleteByQuery(deleteByQuerySelector);
 }
 public async Task DeleteByQueryAsync <T>(IDeleteByQueryRequest <T> deleteByQuerySelector) where T : class
 {
     await _client.DeleteByQueryAsync(deleteByQuerySelector);
 }
 /// <inheritdoc />
 public Task <DeleteByQueryResponse> DeleteByQueryAsync(IDeleteByQueryRequest request, CancellationToken ct = default) =>
 DoRequestAsync <IDeleteByQueryRequest, DeleteByQueryResponse>
     (request, request.RequestParameters, ct, r => AcceptAllStatusCodesHandler(r));
 /// <inheritdoc />
 public DeleteByQueryResponse DeleteByQuery(IDeleteByQueryRequest request) =>
 DoRequest <IDeleteByQueryRequest, DeleteByQueryResponse>(request, request.RequestParameters, r => AcceptAllStatusCodesHandler(r));
Ejemplo n.º 15
0
 /// <inheritdoc/>
 public Task <IDeleteByQueryResponse> DeleteByQueryAsync(IDeleteByQueryRequest request) =>
 this.Dispatcher.DispatchAsync <IDeleteByQueryRequest, DeleteByQueryRequestParameters, DeleteByQueryResponse, IDeleteByQueryResponse>(
     this.ForceConfiguration <IDeleteByQueryRequest, DeleteByQueryRequestParameters>(request, c => c.AllowedStatusCodes = new[] { -1 }),
     this.LowLevelDispatch.DeleteByQueryDispatchAsync <DeleteByQueryResponse>
     );