public Health( IElasticSearchSettings settings, IHttpClientHelper httpClientHelper) { _settings = settings; _httpClientHelper = httpClientHelper; }
private static HttpClient SetupClient() { var client = MessageHandler.Handler != null ? new HttpClient(MessageHandler.Handler) : new HttpClient(); IElasticSearchSettings settings = ServiceLocator.Current.GetInstance <IElasticSearchSettings>(); if (!String.IsNullOrEmpty(settings.Username) && !String.IsNullOrEmpty(settings.Password)) { var credentials = Encoding.ASCII.GetBytes( String.Concat(settings.Username, ":", settings.Password)); client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", Convert.ToBase64String(credentials)); } else { client.DefaultRequestHeaders.Authorization = null; } if (settings.ClientTimeoutSeconds > 0) { client.Timeout = TimeSpan.FromSeconds(settings.ClientTimeoutSeconds); } return(client); }
public ControllerStub( IElasticSearchSettings settings, IHttpClientHelper httpClientHelper, ILanguageBranchRepository languageBranchRepository) : base(settings, httpClientHelper, languageBranchRepository) { }
public InspectorRepository(IElasticSearchSettings settings, IHttpClientHelper httpClientHelper, IContentTypeRepository contentTypeRepository) { _elasticSearchSettings = settings; _contentTypeRepository = contentTypeRepository; _httpClientHelper = httpClientHelper; _mapping = new Mapping(settings, httpClientHelper); }
public MappingValidatorService(IServerInfoService serverInfoService, IElasticSearchSettings elasticSearchSettings, IHttpClientHelper httpClientHelper) { _serverInfoService = serverInfoService; _elasticSearchSettings = elasticSearchSettings; _httpClientHelper = httpClientHelper; _mapping = new Mapping(_serverInfoService, _elasticSearchSettings, _httpClientHelper); }
public ElasticSearchService( IServerInfoService serverInfoService, IElasticSearchSettings settings, IHttpClientHelper httpClientHelper) : base(serverInfoService, settings, httpClientHelper) { }
public ElasticAutoSuggestController( ILanguageBranchRepository languageBranchRepository, IAutoSuggestRepository autoSuggestRepository, IElasticSearchSettings settings, IHttpClientHelper httpClientHelper) : base(settings, httpClientHelper, languageBranchRepository) { _autoSuggestRepository = autoSuggestRepository; }
public ElasticBoostingController( IContentLoader contentLoader, IBoostingRepository boostingRepository, IContentTypeRepository pageTypeRepository, IElasticSearchSettings elasticSearchSettings) { _boostingRepository = boostingRepository; _pageTypeRepository = pageTypeRepository; }
public ElasticIndexInspectorController( IElasticSearchSettings settings, IHttpClientHelper httpClientHelper, IInspectorRepository inspectorRepository, ILanguageBranchRepository languageBranchRepository) : base(settings, httpClientHelper, languageBranchRepository) { _inspectorRepository = inspectorRepository; }
public Indexing( IServerInfoService serverInfoService, IElasticSearchSettings settings, IHttpClientHelper httpClientHelper) { _serverInfoService = serverInfoService; _settings = settings; _httpClientHelper = httpClientHelper; }
internal SearchEngine( IServerInfoService serverInfoService, IElasticSearchSettings settings, IHttpClientHelper httpClientHelper) { _settings = settings; _httpClientHelper = httpClientHelper; _serverInfo = serverInfoService.GetInfo(); }
public ElasticTrackingController( ILanguageBranchRepository languageBranchRepository, ITrackingRepository trackingRepository, IElasticSearchSettings settings, IHttpClientHelper httpClientHelper) : base(settings, httpClientHelper, languageBranchRepository) { _trackingRepository = trackingRepository; }
public ElasticConsoleController( ILanguageBranchRepository languageBranchRepository, IElasticSearchSettings settings, IHttpClientHelper httpClientHelper) : base(settings, httpClientHelper, languageBranchRepository) { _settings = settings; _httpClientHelper = httpClientHelper; }
private static string GetHost() { if (_settings == null) { _settings = ServiceLocator.Current.GetInstance <IElasticSearchSettings>(); } return(_settings.Host); }
public QueryBuilder( IServerInfoService serverInfoService, IElasticSearchSettings settings, IHttpClientHelper httpClientHelper) { _settings = settings; _mapping = new Mapping(serverInfoService, settings, httpClientHelper); ServiceLocator.Current?.TryGetExistingInstance(out _boostingRepository); }
public ElasticSynonymsController( ILanguageBranchRepository languageBranchRepository, ISynonymRepository synonymRepository, IElasticSearchSettings settings, IHttpClientHelper httpClientHelper) : base(settings, httpClientHelper, languageBranchRepository) { _synonymRepository = synonymRepository; }
public ElasticAdminController( ILanguageBranchRepository languageBranchRepository, ICoreIndexer coreIndexer, IElasticSearchSettings settings) { _languageBranchRepository = languageBranchRepository; _coreIndexer = coreIndexer; _settings = settings; _healthHelper = new Health(settings); }
public Index(IElasticSearchSettings settings, string name) : this(settings) { if (String.IsNullOrWhiteSpace(name)) { throw new InvalidOperationException("'name' can not be empty."); } _name = name.ToLower(); _language = _name.Split('-').Last(); }
public ElasticSynonymsController( ISynonymRepository synonymRepository, ILanguageBranchRepository languageBranchRepository, IElasticSearchSettings settings) : this( synonymRepository, languageBranchRepository, new Admin.Index(settings)) { }
public CoreIndexer( IServerInfoService serverInfoService, IElasticSearchSettings settings, IHttpClientHelper httpClientHelper) { _serverInfoService = serverInfoService; _settings = settings; _httpClientHelper = httpClientHelper; _mapping = new Mapping(serverInfoService, settings, httpClientHelper); _serverInfo = serverInfoService.GetInfo(); }
public SynonymRepository( IContentRepository contentRepository, IBlobFactory blobFactory, IElasticSearchSettings settings, IHttpClientHelper httpClientHelper) { _contentRepository = contentRepository; _blobFactory = blobFactory; _settings = settings; _httpClientHelper = httpClientHelper; }
public ElasticBoostingController( ILanguageBranchRepository languageBranchRepository, IBoostingRepository boostingRepository, IContentTypeRepository pageTypeRepository, IElasticSearchSettings settings, IHttpClientHelper httpClientHelper) : base(settings, httpClientHelper, languageBranchRepository) { _boostingRepository = boostingRepository; _pageTypeRepository = pageTypeRepository; }
public ElasticBestBetsController( IContentLoader contentLoader, IBestBetsRepository bestBetsRepository, ILanguageBranchRepository languageBranchRepository, IElasticSearchSettings settings, IHttpClientHelper httpClientHelper) : base(settings, httpClientHelper, languageBranchRepository) { _contentLoader = contentLoader; _bestBetsRepository = bestBetsRepository; }
public SynonymRepository( IContentLoader contentLoader, IContentRepository contentRepository, IBlobFactory blobFactory, IElasticSearchSettings settings) { _contentLoader = contentLoader; _contentRepository = contentRepository; _blobFactory = blobFactory; _settings = settings; }
public ElasticAdminController( ILanguageBranchRepository languageBranchRepository, ICoreIndexer coreIndexer, IElasticSearchSettings settings, IHttpClientHelper httpClientHelper) : base(settings, httpClientHelper, languageBranchRepository) { _coreIndexer = coreIndexer; _settings = settings; _healthHelper = new Health(settings, httpClientHelper); _httpClientHelper = httpClientHelper; }
protected ElasticSearchControllerBase( IElasticSearchSettings settings, IHttpClientHelper httpClientHelper, ILanguageBranchRepository languageBranchRepository) { _settings = settings; _httpClientHelper = httpClientHelper; _languageBranchRepository = languageBranchRepository; Indices = GetIndices(); Languages = GetLanguages(); }
public ElasticTrackingController( IContentLoader contentLoader, ILanguageBranchRepository languageBranchRepository, ITrackingRepository trackingRepository, IElasticSearchSettings settings) : this( contentLoader, languageBranchRepository, trackingRepository, new Admin.Index(settings)) { }
public InspectorRepository( IElasticSearchSettings settings, IServerInfoService serverInfoService, IHttpClientHelper httpClientHelper, IContentTypeRepository contentTypeRepository) { _elasticSearchSettings = settings; _contentTypeRepository = contentTypeRepository; _httpClientHelper = httpClientHelper; _mapping = new Mapping(serverInfoService, settings, httpClientHelper); _serverInfo = serverInfoService.GetInfo(); }
public Indexer( ICoreIndexer coreIndexer, IElasticSearchSettings elasticSearchSettings, ISiteDefinitionRepository siteDefinitionRepository, IContentLoader contentLoader, ContentAssetHelper contentAssetHelper) { _coreIndexer = coreIndexer; _elasticSearchSettings = elasticSearchSettings; _siteDefinitionRepository = siteDefinitionRepository; _contentLoader = contentLoader; _contentAssetHelper = contentAssetHelper; }
public BestBetsRepository( IElasticSearchSettings settings, IContentRepository contentRepository, UrlResolver urlResolver, IBlobFactory blobFactory, ICoreIndexer coreIndexer) { _settings = settings; _contentRepository = contentRepository; _urlResolver = urlResolver; _blobFactory = blobFactory; _coreIndexer = coreIndexer; }