Exemplo n.º 1
0
 /// <inheritdoc/>
 public Task <IGetFieldMappingResponse> GetFieldMappingAsync(IGetFieldMappingRequest request, CancellationToken cancellationToken = default(CancellationToken)) =>
 this.Dispatcher.DispatchAsync <IGetFieldMappingRequest, GetFieldMappingRequestParameters, GetFieldMappingResponse, IGetFieldMappingResponse>(
     request,
     cancellationToken,
     new GetFieldMappingConverter((r, s) => DeserializeGetFieldMappingResponse(r, request, s)),
     (p, d, c) => this.LowLevelDispatch.IndicesGetFieldMappingDispatchAsync <GetFieldMappingResponse>(p, c)
     );
 /// <inheritdoc />
 public Task <IGetFieldMappingResponse> GetFieldMappingAsync(IGetFieldMappingRequest request,
                                                             CancellationToken cancellationToken = default(CancellationToken)
                                                             ) =>
 Dispatcher.DispatchAsync <IGetFieldMappingRequest, GetFieldMappingRequestParameters, GetFieldMappingResponse, IGetFieldMappingResponse>(
     request,
     cancellationToken,
     (p, d, c) => LowLevelDispatch.IndicesGetFieldMappingDispatchAsync <GetFieldMappingResponse>(p, c)
     );
Exemplo n.º 3
0
 /// <inheritdoc />
 public Task <IGetFieldMappingResponse> GetFieldMappingAsync(IGetFieldMappingRequest getFieldMappingRequest)
 {
     return(this.DispatchAsync <IGetFieldMappingRequest, GetFieldMappingRequestParameters, GetFieldMappingResponse, IGetFieldMappingResponse>(
                getFieldMappingRequest,
                (p, d) => this.RawDispatch.IndicesGetFieldMappingDispatchAsync <GetFieldMappingResponse>(
                    p.DeserializationState(new GetFieldMappingConverter((r, s) => DeserializeGetFieldMappingResponse(r, d, s)))
                    )
                ));
 }
        //TODO DictionaryResponse!
        private GetFieldMappingResponse DeserializeGetFieldMappingResponse(IApiCallDetails response, IGetFieldMappingRequest d, Stream stream)
        {
            var dict = response.Success
                                ? Serializer.Deserialize <IndexFieldMappings>(stream)
                                : null;

            return(new GetFieldMappingResponse(response, dict));
        }
 /// <inheritdoc/>
 public Task <IGetFieldMappingResponse> GetFieldMappingAsync(IGetFieldMappingRequest request) =>
 this.Dispatcher.DispatchAsync <IGetFieldMappingRequest, GetFieldMappingRequestParameters, GetFieldMappingResponse, IGetFieldMappingResponse>(
     request,
     new GetFieldMappingConverter((r, s) => DeserializeGetFieldMappingResponse(r, request, s)),
     (p, d) => this.LowLevelDispatch.IndicesGetFieldMappingDispatchAsync <GetFieldMappingResponse>(p)
     );
 public static Task <GetFieldMappingResponse> GetFieldMappingAsync(this IElasticClient client, IGetFieldMappingRequest request,
                                                                   CancellationToken ct = default
                                                                   )
 => client.Indices.GetFieldMappingAsync(request, ct);
 public static GetFieldMappingResponse GetFieldMapping(this IElasticClient client, IGetFieldMappingRequest request)
 => client.Indices.GetFieldMapping(request);
Exemplo n.º 8
0
 /// <inheritdoc/>
 public IGetFieldMappingResponse GetFieldMapping(IGetFieldMappingRequest request) =>
 this.Dispatcher.Dispatch <IGetFieldMappingRequest, GetFieldMappingRequestParameters, GetFieldMappingResponse>(
     request,
     (p, d) => this.LowLevelDispatch.IndicesGetFieldMappingDispatch <GetFieldMappingResponse>(p)
     );
Exemplo n.º 9
0
        //TODO DictionaryResponse!
        private GetFieldMappingResponse DeserializeGetFieldMappingResponse(IApiCallDetails response, IGetFieldMappingRequest d, Stream stream)
        {
            var dict = response.Success
                                ? Serializer.Deserialize <Dictionary <string, TypeFieldMappings> >(stream)
                                : null;

            return(new GetFieldMappingResponse(response, dict, this.ConnectionSettings.Inferrer));
        }
 /// <inheritdoc />
 public Task <GetFieldMappingResponse> GetFieldMappingAsync(IGetFieldMappingRequest request, CancellationToken ct = default) =>
 DoRequestAsync <IGetFieldMappingRequest, GetFieldMappingResponse>(request, request.RequestParameters, ct);
 /// <inheritdoc />
 public GetFieldMappingResponse GetFieldMapping(IGetFieldMappingRequest request) =>
 DoRequest <IGetFieldMappingRequest, GetFieldMappingResponse>(request, request.RequestParameters);
 public static void Update(ElasticsearchPathInfo <GetFieldMappingRequestParameters> pathInfo, IGetFieldMappingRequest request)
 {
     pathInfo.HttpMethod = PathInfoHttpMethod.GET;
 }