Example #1
0
        public YamlTestsBase()
        {
            var host = "localhost";

            if (Process.GetProcessesByName("fiddler").Any())
            {
                host = "ipv4.fiddler";
            }
            var uri      = new Uri("http://" + host + ":9200/");
            var settings = new ConnectionSettings(uri, "nest-default-index")
                           .UsePrettyResponses();

            _client = new RawElasticClient(settings);

            _client.IndicesDelete("_all", d => d.MasterTimeout("1m").Timeout("1m"));
            _client.IndicesDeleteTemplateForAll("*");
            dynamic info    = _client.InfoGet().Response;
            string  version = info.version.number;

            this._versionNumber = new Version(version);
        }