public ElasticSearchHelper() { var settings = new ConnectionSettings(WebConfigHelper.ElasticSearchUri, indexName); settings.ThrowOnElasticsearchServerExceptions(); elasticClient = new ElasticClient(settings); searchDefinition = ElasticSearchHelper.GetSearchDefinition(); }
public ConnectionSettings Get() { var pool = new SniffingConnectionPool(Url); var settings = new ConnectionSettings(pool); settings.ThrowOnElasticsearchServerExceptions(); if (EnableTrace) settings.EnableTrace(); return settings; }
public IndexPopulator(string siteId) { SiteID = siteId; this.IndexName = SiteID.ToLower() + "_trainingindex"; var node = ElasticSearchUri; var settings = new ConnectionSettings(node, this.IndexName); settings.ThrowOnElasticsearchServerExceptions(true); this.SearchClient = new ElasticClient(settings); }
public ElasticClient GetElasticClient() { ConnectionSettings settings = new ConnectionSettings(connectionPool, ElasticMappingConstants.INDEX_NAME); settings.ThrowOnElasticsearchServerExceptions(true); return new ElasticClient(settings); }