private static string MoveTextFromQueryString(IAnalyzeRequest d) { IRequest<AnalyzeRequestParameters> request = d; var text = request.RequestParameters.GetQueryStringValue<string[]>("text"); request.RequestParameters.RemoveQueryString("text"); return string.Join(",", text); }
private static string MoveTextFromQueryString(IAnalyzeRequest d) { IRequest <AnalyzeRequestParameters> request = d; var text = request.RequestParameters.GetQueryStringValue <string[]>("text"); request.RequestParameters.RemoveQueryString("text"); return(string.Join(",", text)); }
/// <inheritdoc /> public Task <IAnalyzeResponse> AnalyzeAsync(IAnalyzeRequest analyzeRequest) { return(this.DispatchAsync <IAnalyzeRequest, AnalyzeRequestParameters, AnalyzeResponse, IAnalyzeResponse>( analyzeRequest, (p, d) => { IRequest <AnalyzeRequestParameters> request = d; var text = request.RequestParameters.GetQueryStringValue <string>("text"); request.RequestParameters.RemoveQueryString("text"); return this.RawDispatch.IndicesAnalyzeDispatchAsync <AnalyzeResponse>(p, text); } )); }
/// <inheritdoc /> public Task<IAnalyzeResponse> AnalyzeAsync(IAnalyzeRequest analyzeRequest) { return this.DispatchAsync<IAnalyzeRequest, AnalyzeRequestParameters, AnalyzeResponse, IAnalyzeResponse>( analyzeRequest, (p, d) => { IRequest<AnalyzeRequestParameters> request = d; var text = request.RequestParameters.GetQueryStringValue<string>("text"); request.RequestParameters.RemoveQueryString("text"); return this.RawDispatch.IndicesAnalyzeDispatchAsync<AnalyzeResponse>(p, text); } ); }
/// <inheritdoc /> public IAnalyzeResponse Analyze(IAnalyzeRequest analyzeRequest) { return(this.Dispatch <IAnalyzeRequest, AnalyzeRequestParameters, AnalyzeResponse>( analyzeRequest, (p, d) => { IRequest <AnalyzeRequestParameters> request = d; var text = request.RequestParameters.GetQueryStringValue <string>("text"); request.RequestParameters.RemoveQueryString("text"); text.ThrowIfNullOrEmpty("No text specified to analyze"); return this.RawDispatch.IndicesAnalyzeDispatch <AnalyzeResponse>(p, text); } )); }
/// <inheritdoc /> public IAnalyzeResponse Analyze(IAnalyzeRequest analyzeRequest) { return this.Dispatch<IAnalyzeRequest, AnalyzeRequestParameters, AnalyzeResponse>( analyzeRequest, (p, d) => { IRequest<AnalyzeRequestParameters> request = d; var text = request.RequestParameters.GetQueryStringValue<string>("text"); request.RequestParameters.RemoveQueryString("text"); text.ThrowIfNullOrEmpty("No text specified to analyze"); return this.RawDispatch.IndicesAnalyzeDispatch<AnalyzeResponse>(p, text); } ); }
/// <inheritdoc/> public Task <IAnalyzeResponse> AnalyzeAsync(IAnalyzeRequest request, CancellationToken cancellationToken = default(CancellationToken)) => this.Dispatcher.DispatchAsync <IAnalyzeRequest, AnalyzeRequestParameters, AnalyzeResponse, IAnalyzeResponse>( request, cancellationToken, (p, d, c) => this.LowLevelDispatch.IndicesAnalyzeDispatchAsync <AnalyzeResponse>(p, MoveTextFromQueryString(request), c) );
/// <inheritdoc/> public Task <IAnalyzeResponse> AnalyzeAsync(IAnalyzeRequest request) => this.Dispatcher.DispatchAsync <IAnalyzeRequest, AnalyzeRequestParameters, AnalyzeResponse, IAnalyzeResponse>( request, (p, d) => this.LowLevelDispatch.IndicesAnalyzeDispatchAsync <AnalyzeResponse>(p, MoveTextFromQueryString(request)) );
/// <inheritdoc/> public IAnalyzeResponse Analyze(IAnalyzeRequest request) => this.Dispatcher.Dispatch <IAnalyzeRequest, AnalyzeRequestParameters, AnalyzeResponse>( request, (p, d) => this.LowLevelDispatch.IndicesAnalyzeDispatch <AnalyzeResponse>(p, MoveTextFromQueryString(request)) );
/// <inheritdoc/> public Task <IAnalyzeResponse> AnalyzeAsync(IAnalyzeRequest request, CancellationToken cancellationToken = default(CancellationToken)) => this.Dispatcher.DispatchAsync <IAnalyzeRequest, AnalyzeRequestParameters, AnalyzeResponse, IAnalyzeResponse>( request, cancellationToken, this.LowLevelDispatch.IndicesAnalyzeDispatchAsync <AnalyzeResponse> );
public static void Update(ElasticsearchPathInfo <AnalyzeRequestParameters> pathInfo, IAnalyzeRequest request) { pathInfo.HttpMethod = PathInfoHttpMethod.POST; }
/// <inheritdoc /> public Task <AnalyzeResponse> AnalyzeAsync(IAnalyzeRequest request, CancellationToken ct = default) => DoRequestAsync <IAnalyzeRequest, AnalyzeResponse>(request, request.RequestParameters, ct);
/// <inheritdoc/> public IAnalyzeResponse Analyze(IAnalyzeRequest request) => this.Dispatcher.Dispatch <IAnalyzeRequest, AnalyzeRequestParameters, AnalyzeResponse>( request, this.LowLevelDispatch.IndicesAnalyzeDispatch <AnalyzeResponse> );
/// <inheritdoc/> public Task<IAnalyzeResponse> AnalyzeAsync(IAnalyzeRequest request) => this.Dispatcher.DispatchAsync<IAnalyzeRequest, AnalyzeRequestParameters, AnalyzeResponse, IAnalyzeResponse>( request, (p, d) => this.LowLevelDispatch.IndicesAnalyzeDispatchAsync<AnalyzeResponse>(p, MoveTextFromQueryString(request)) );
public static AnalyzeResponse Analyze(this IElasticClient client, IAnalyzeRequest request) => client.Indices.Analyze(request);
public static Task <AnalyzeResponse> AnalyzeAsync(this IElasticClient client, IAnalyzeRequest request, CancellationToken ct = default) => client.Indices.AnalyzeAsync(request, ct);
/// <inheritdoc/> public IAnalyzeResponse Analyze(IAnalyzeRequest request) => this.Dispatcher.Dispatch<IAnalyzeRequest, AnalyzeRequestParameters, AnalyzeResponse>( request, this.LowLevelDispatch.IndicesAnalyzeDispatch<AnalyzeResponse> );
/// <inheritdoc/> public Task<IAnalyzeResponse> AnalyzeAsync(IAnalyzeRequest request, CancellationToken cancellationToken = default(CancellationToken)) => this.Dispatcher.DispatchAsync<IAnalyzeRequest, AnalyzeRequestParameters, AnalyzeResponse, IAnalyzeResponse>( request, cancellationToken, this.LowLevelDispatch.IndicesAnalyzeDispatchAsync<AnalyzeResponse> );
/// <inheritdoc /> public AnalyzeResponse Analyze(IAnalyzeRequest request) => DoRequest <IAnalyzeRequest, AnalyzeResponse>(request, request.RequestParameters);
/// <inheritdoc/> public IAnalyzeResponse Analyze(IAnalyzeRequest request) => this.Dispatcher.Dispatch<IAnalyzeRequest, AnalyzeRequestParameters, AnalyzeResponse>( request, (p, d) => this.LowLevelDispatch.IndicesAnalyzeDispatch<AnalyzeResponse>(p, MoveTextFromQueryString(request)) );