Exemplo n.º 1
0
        /// <summary>
        /// Initializes the current instance.
        /// </summary>
        protected override void InitializeTarget()
        {
            base.InitializeTarget();

            var uri            = Uri;
            var nodes          = uri.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries).Select(url => new Uri(url));
            var connectionPool = new StaticConnectionPool(nodes);

            var config = new ConnectionConfiguration(connectionPool);

            config.DisableAutomaticProxyDetection();

            _client = new ElasticLowLevelClient(config);
        }