public IIndexConfig CreateIndex(IIndexSelector selector) { var index = Factories.Index.Create(this, selector); index = this.Indexes.AddOrUpdate(index.Identifier, index); return(index); }
public IIndexConfig GetIndex(IIndexSelector selector) { var existing = default(IIndexConfig); var index = Factories.Index.Create(this, selector); if (!this.Indexes.TryGetValue(index.Identifier, out existing) || !IndexComparer.IndexConfig.Equals(index, existing)) { return(default(IIndexConfig)); } return(existing); }
public ElasticSearchWrapper(IElasticClient esClient, IQueryFactory queryFactory, IPagingHelper pagingHelper, ISortFactory sortFactory, ILogger <ElasticSearchWrapper> logger, IIndexSelector indexSelector, IFilterFactory filterFactory) { _esClient = esClient; _queryFactory = queryFactory; _pagingHelper = pagingHelper; _sortFactory = sortFactory; _filterFactory = filterFactory; _logger = logger; _indexSelector = indexSelector; }
public IIndexConfig Create(ITableConfig table, IIndexSelector selector) { switch (selector.SelectorType) { case IndexSelectorType.Columns: return(this.Create(table, selector.Identifier, selector.Columns, selector.Flags)); case IndexSelectorType.ColumnNames: return(this.Create(table, selector.Identifier, selector.ColumnNames, selector.Flags)); default: throw new NotImplementedException(); } }