// Methods
 public ElasticSearchFieldNameTranslator(ElasticSearchIndex index)
 {
     Assert.ArgumentNotNull(index, "index");
     _index              = index;
     _fieldMap           = _index.Configuration.FieldMap as ElasticSearchFieldMap;
     _defaultCultureCode = Settings.DefaultLanguage;
     _currentCultureCode = _defaultCultureCode;
 }
示例#2
0
 public ElasticSearchUpdateContext(ElasticSearchIndex elasticSearchIndex, ElasticClient esClient, ICommitPolicy commitPolicy, ICommitPolicyExecutor commitPolicyExecutor)
     : this(elasticSearchIndex, esClient)
 {
     if (commitPolicy != null && commitPolicyExecutor == null)
     {
         throw new ArgumentNullException("commitPolicyExecutor");
     }
     CommitPolicy          = commitPolicy;
     _commitPolicyExecutor = (commitPolicy != null) ? commitPolicyExecutor : new NullCommitPolicyExecutor();
 }
示例#3
0
        // Methods
        public ElasticSearchUpdateContext(ElasticSearchIndex index, ElasticClient esClient)
        {
            Assert.ArgumentNotNull(index, "index");

            _index    = index;
            _esClient = esClient;
            _documentsToAddOrUpdate = new List <Dictionary <string, object> >();
            _documentIdsToDelete    = new List <string>();

            IsParallel      = ContentSearchConfigurationSettings.IsParallelIndexingEnabled;
            ParallelOptions = new ParallelOptions();
            var parallelIndexingCoreLimit = ContentSearchConfigurationSettings.ParallelIndexingCoreLimit;

            if (parallelIndexingCoreLimit > 0)
            {
                ParallelOptions.MaxDegreeOfParallelism = parallelIndexingCoreLimit;
            }
            _commitPolicyExecutor = new NullCommitPolicyExecutor();
        }
示例#4
0
 public ElasticSearchIndexSummary(ElasticSearchIndex index, ElasticClient esClient)
 {
     _index    = index;
     _esClient = esClient;
 }
 public ElasticSearchContext(ElasticSearchIndex index,
                             SearchSecurityOptions securityOptions = SearchSecurityOptions.EnableSecurityCheck)
 {
     Index           = index;
     SecurityOptions = securityOptions;
 }
示例#6
0
 public ElasticSearchIndexOperations(ElasticSearchIndex index)
 {
     Assert.ArgumentNotNull(index, "index");
     _index = index;
 }