public MemberElasticSearchIndex(string name, ElasticSearchConfig connectionConfiguration,
                                 IPublicAccessService publicAccessService, IProfilingLogger profilingLogger,
                                 FieldDefinitionCollection fieldDefinitions = null, string analyzer = null,
                                 IValueSetValidator validator = null) : base(name, connectionConfiguration, publicAccessService,
                                                                             profilingLogger, fieldDefinitions, analyzer, validator)
 {
 }
 public ElasticSearchSearcher(ElasticSearchConfig connectionConfiguration, string name, string prefix = "") : base(name)
 {
     _connectionConfiguration = connectionConfiguration;
     _indexName = name;
     _client    = new Lazy <ElasticClient>(CreateElasticSearchClient);
     _prefix    = prefix;
 }
Exemplo n.º 3
0
 public ElasticSearchSearcher(ElasticSearchConfig connectionConfiguration, string name, string indexName) :
     base(name)
 {
     _connectionConfiguration = connectionConfiguration;
     _indexName = name;
     _client    = new Lazy <ElasticClient>(CreateElasticSearchClient);
     indexAlias = prefix + Name;
     IndexName  = indexName;
 }
Exemplo n.º 4
0
 private IIndex CreateMemberIndex()
 {
     return(new MemberElasticSearchIndex(Constants.UmbracoIndexes.MembersIndexName,
                                         ElasticSearchConfig.GetConfig(Constants.UmbracoIndexes.ExternalIndexName),
                                         _publicAccessService,
                                         ProfilingLogger,
                                         new UmbracoFieldDefinitionCollection(),
                                         "standard",
                                         GetMemberValueSetValidator()));
 }
Exemplo n.º 5
0
 private IIndex CreateInternalIndex()
 {
     return(new ContentElasticSearchIndex(Constants.UmbracoIndexes.InternalIndexName,
                                          ElasticSearchConfig.GetConfig(Constants.UmbracoIndexes.InternalIndexName),
                                          _publicAccessService,
                                          ProfilingLogger,
                                          new UmbracoFieldDefinitionCollection(),
                                          "whitespace",
                                          GetContentValueSetValidator()));
 }
Exemplo n.º 6
0
 public ElasticSearchIndex(string name,
                           ElasticSearchConfig connectionConfiguration,
                           IPublicAccessService publicAccessService,
                           IProfilingLogger profilingLogger,
                           FieldDefinitionCollection fieldDefinitions = null,
                           string analyzer = null,
                           IValueSetValidator validator = null)
     : base(name.ToLowerInvariant(), //TODO: Need to 'clean' the name according to Azure Search rules
            fieldDefinitions ?? new FieldDefinitionCollection(), validator)
 {
     _connectionConfiguration = connectionConfiguration;
     _logger    = profilingLogger;
     Analyzer   = analyzer;
     ElasticURL = ConfigurationManager.AppSettings[$"examine:ElasticSearch[{name}].Url"];
     _searcher  = new Lazy <ElasticSearchSearcher>(CreateSearcher);
     _client    = new Lazy <ElasticClient>(CreateElasticSearchClient);
     indexAlias = prefix + indexName;
 }