Table of Contents

Class RequestConfiguration

Namespace
Elasticsearch.Net
Assembly
Elasticsearch.Net.dll
public class RequestConfiguration : IRequestConfiguration
Inheritance
RequestConfiguration
Implements
Inherited Members

Constructors

RequestConfiguration()

public RequestConfiguration()

Properties

Accept

Force a different Accept header on the request

public string Accept { get; set; }

Property Value

string

AllowedStatusCodes

Treat the following statuses (on top of the 200 range) NOT as error.

public IEnumerable<int> AllowedStatusCodes { get; set; }

Property Value

IEnumerable<int>

BasicAuthenticationCredentials

Basic access authorization credentials to specify with this request. Overrides any credentials that are set at the global IConnectionSettings level.

public BasicAuthenticationCredentials BasicAuthenticationCredentials { get; set; }

Property Value

BasicAuthenticationCredentials

CancellationToken

public CancellationToken CancellationToken { get; set; }

Property Value

CancellationToken

ClientCertificates

Use the following client certificates to authenticate this single request

public X509CertificateCollection ClientCertificates { get; set; }

Property Value

X509CertificateCollection

ContentType

Force a different Content-Type header on the request

public string ContentType { get; set; }

Property Value

string

DisableDirectStreaming

Whether to buffer the request and response bytes for the call

public bool? DisableDirectStreaming { get; set; }

Property Value

bool?

DisablePing

Under no circumstance do a ping before the actual call. If a node was previously dead a small ping with low connect timeout will be tried first in normal circumstances

public bool? DisablePing { get; set; }

Property Value

bool?

DisableSniff

Forces no sniffing to occur on the request no matter what configuration is in place globally

public bool? DisableSniff { get; set; }

Property Value

bool?

EnableHttpPipelining

Whether or not this request should be pipelined. http://en.wikipedia.org/wiki/HTTP_pipelining defaults to true

public bool EnableHttpPipelining { get; set; }

Property Value

bool

ForceNode

This will force the operation on the specified node, this will bypass any configured connection pool and will no retry.

public Uri ForceNode { get; set; }

Property Value

Uri

MaxRetries

This will override whatever is set on the connection configuration or whatever default the connectionpool has.

public int? MaxRetries { get; set; }

Property Value

int?

PingTimeout

The ping timeout for this specific request

public TimeSpan? PingTimeout { get; set; }

Property Value

TimeSpan?

RequestTimeout

The timeout for this specific request, takes precedence over the global timeout settings

public TimeSpan? RequestTimeout { get; set; }

Property Value

TimeSpan?

RunAs

Submit the request on behalf in the context of a different user https://www.elastic.co/guide/en/shield/current/submitting-requests-for-other-users.html

public string RunAs { get; set; }

Property Value

string

ThrowExceptions

Instead of following a c/go like error checking on response.IsValid always throw an exception on the client when a call resulted in an exception on either the client or the Elasticsearch server.

Reasons for such exceptions could be search parser errors, index missing exceptions, etc...

public bool ThrowExceptions { get; set; }

Property Value

bool