Table of Contents

Interface IConnectionConfigurationValues

Namespace
Elasticsearch.Net
Assembly
Elasticsearch.Net.dll
public interface IConnectionConfigurationValues : IDisposable
Inherited Members

Properties

BasicAuthenticationCredentials

Basic access authorization credentials to specify with all requests.

BasicAuthenticationCredentials BasicAuthenticationCredentials { get; }

Property Value

BasicAuthenticationCredentials

BootstrapLock

Provides a semaphoreslim to transport implementations that need to limit access to a resource

SemaphoreSlim BootstrapLock { get; }

Property Value

SemaphoreSlim

ClientCertificates

Use the following certificates to authenticate all HTTP requests. You can also set them on individual request using ClientCertificates

X509CertificateCollection ClientCertificates { get; }

Property Value

X509CertificateCollection

Connection

The connection implementation to use when talking with elasticsearch

IConnection Connection { get; }

Property Value

IConnection

ConnectionLimit

Limits the number of concurrent connections that can be opened to an endpoint. Defaults to 80 (see DefaultConnectionLimit).

For Desktop CLR, this setting applies to the DefaultConnectionLimit property on the ServicePointManager object when creating ServicePoint objects, affecting the default IConnection implementation.

For Core CLR, this setting applies to the MaxConnectionsPerServer property on the HttpClientHandler instances used by the HttpClient inside the default IConnection implementation

int ConnectionLimit { get; }

Property Value

int

ConnectionPool

The connection pool to use when talking with elasticsearch

IConnectionPool ConnectionPool { get; }

Property Value

IConnectionPool

DeadTimeout

The time to put dead nodes out of rotation (this will be multiplied by the number of times they've been dead)

TimeSpan? DeadTimeout { get; }

Property Value

TimeSpan?

DisableAutomaticProxyDetection

Disabled proxy detection on the webrequest, in some cases this may speed up the first connection your appdomain makes, in other cases it will actually increase the time for the first connection. No silver bullet! use with care!

bool DisableAutomaticProxyDetection { get; }

Property Value

bool

DisableDirectStreaming

When set to true will disable (de)serializing directly to the request and response stream and return a byte[] copy of the raw request and response on elasticsearch calls. Defaults to false

bool DisableDirectStreaming { get; }

Property Value

bool

DisablePings

This signals that we do not want to send initial pings to unknown/previously dead nodes and just send the call straightaway

bool DisablePings { get; }

Property Value

bool

EnableHttpCompression

Enable gzip compressed requests and responses, do note that you need to configure elasticsearch to set this

http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-http.html

bool EnableHttpCompression { get; }

Property Value

bool

Headers

Try to send these headers for every request

NameValueCollection Headers { get; }

Property Value

NameValueCollection

HttpPipeliningEnabled

By default the client enables http pipelining as elasticsearch 2.0 defaults to true as well

bool HttpPipeliningEnabled { get; }

Property Value

bool

KeepAliveInterval

KeepAliveInterval - specifies the interval, in milliseconds, between when successive keep-alive packets are sent if no acknowledgement is received.

TimeSpan? KeepAliveInterval { get; }

Property Value

TimeSpan?

KeepAliveTime

KeepAliveTime - specifies the timeout, in milliseconds, with no activity until the first keep-alive packet is sent.

TimeSpan? KeepAliveTime { get; }

Property Value

TimeSpan?

MaxDeadTimeout

The maximum ammount of time a node is allowed to marked dead

TimeSpan? MaxDeadTimeout { get; }

Property Value

TimeSpan?

MaxRetries

When a retryable exception occurs or status code is returned this controls the maximum amount of times we should retry the call to elasticsearch

int? MaxRetries { get; }

Property Value

int?

MaxRetryTimeout

Limits the total runtime including retries separately from RequestTimeout

When not specified defaults to RequestTimeout which itself defaults to 60 seconds
TimeSpan? MaxRetryTimeout { get; }

Property Value

TimeSpan?

NodePredicate

Register a predicate to select which nodes that you want to execute API calls on. Note that sniffing requests omit this predicate and always execute on all nodes. When using an IConnectionPool implementation that supports reseeding of nodes, this will default to omitting master only node from regular API calls. When using static or single node connection pooling it is assumed the list of node you instantiate the client with should be taken verbatim.

Func<Node, bool> NodePredicate { get; }

Property Value

Func<Node, bool>

OnRequestCompleted

Allows you to register a callback every time a an API call is returned

Action<IApiCallDetails> OnRequestCompleted { get; }

Property Value

Action<IApiCallDetails>

OnRequestDataCreated

An action to run when the RequestData for a request has been created.

Action<RequestData> OnRequestDataCreated { get; }

Property Value

Action<RequestData>

PingTimeout

The timeout in milliseconds to use for ping requests, which are issued to determine whether a node is alive

TimeSpan? PingTimeout { get; }

Property Value

TimeSpan?

PrettyJson

Forces all requests to have ?pretty=true, causing elasticsearch to return formatted json. Also forces the client to send out formatted json. Defaults to false

bool PrettyJson { get; }

Property Value

bool

ProxyAddress

When set will force all connections through this proxy

string ProxyAddress { get; }

Property Value

string

ProxyPassword

The password for the proxy, when configured

string ProxyPassword { get; }

Property Value

string

ProxyUsername

The username for the proxy, when configured

string ProxyUsername { get; }

Property Value

string

QueryStringParameters

Append these query string parameters automatically to every request

NameValueCollection QueryStringParameters { get; }

Property Value

NameValueCollection

RequestResponseSerializer

The serializer to use to serialize requests and deserialize responses

IElasticsearchSerializer RequestResponseSerializer { get; }

Property Value

IElasticsearchSerializer

RequestTimeout

The timeout in milliseconds for each request to Elasticsearch

TimeSpan RequestTimeout { get; }

Property Value

TimeSpan

ServerCertificateValidationCallback

Register a ServerCertificateValidationCallback per request

Func<object, X509Certificate, X509Chain, SslPolicyErrors, bool> ServerCertificateValidationCallback { get; }

Property Value

Func<object, X509Certificate, X509Chain, SslPolicyErrors, bool>

SkipDeserializationForStatusCodes

Configure the client to skip deserialization of certain status codes e.g: you run elasticsearch behind a proxy that returns an unexpected json format

IReadOnlyCollection<int> SkipDeserializationForStatusCodes { get; }

Property Value

IReadOnlyCollection<int>

SniffInformationLifeSpan

Force a new sniff for the cluster when the cluster state information is older than the specified timespan

TimeSpan? SniffInformationLifeSpan { get; }

Property Value

TimeSpan?

SniffsOnConnectionFault

Force a new sniff for the cluster state everytime a connection dies

bool SniffsOnConnectionFault { get; }

Property Value

bool

SniffsOnStartup

Sniff the cluster state immediatly on startup

bool SniffsOnStartup { get; }

Property Value

bool

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...

bool ThrowExceptions { get; }

Property Value

bool

UrlFormatter

ElasticsearchUrlFormatter UrlFormatter { get; }

Property Value

ElasticsearchUrlFormatter