public DocumentIndexProvider(IActivityLoggerFactory loggerFactory, DocumentIndexSetup documentIndexSetup, DocumentIndexMetadata documentIndexMetadata, DocumentIndexOptimizeHintFactory optimizeHintFactory) { _loggerFactory = loggerFactory; _documentIndexSetup = documentIndexSetup; _documentIndexMetadata = documentIndexMetadata; _optimizeHintFactory = optimizeHintFactory; _documentIndexes = new DocumentIndexes(); }
public DocumentIndexProvider(IActivityLoggerFactory loggerFactory, DocumentIndexSetup documentIndexSetup, DocumentIndexMetadata documentIndexMetadata, DocumentIndexOptimizeHintFactory optimizeHintFactory) { _loggerFactory = loggerFactory; _documentIndexSetup = documentIndexSetup; _documentIndexMetadata = documentIndexMetadata; _optimizeHintFactory = optimizeHintFactory; _documentIndexes = new DocumentIndexes(); }
public DocumentIndexTyped(DocumentIndexType indexType, IPluginContext context, Action shuttedDown, DocumentIndexSetup documentIndexSetup, IActivityLoggerFactory loggerFactory, DocumentIndexOptimizeHintFactory optimizeHintFactory) { _indexType = indexType; _logger = loggerFactory.Create(new PluginContextSnapshot(context)); var indexPath = _indexType.GetFileFolder(context.AccountName, documentIndexSetup); _hoot = new Hoot(indexPath, _indexType.FileName, _logger.Debug, _logger.Error, indexType.CreateTokensParser(documentIndexSetup), _logger.IsDebugEnabled); _shuttedDown = shuttedDown; _isAlive = true; _documentIndexSetup = documentIndexSetup; _optimizeHint = optimizeHintFactory.Create(documentIndexSetup); _isOptimized = true; UpdateLastUsedToken(); }
public DocumentIndex(DocumentIndexType charactersIndexType, DocumentIndexType digitsIndexType, IPluginContext context, Action shuttedDown, DocumentIndexSetup documentIndexSetup, IActivityLoggerFactory loggerFactory, DocumentIndexOptimizeHintFactory optimizeHintFactory) { _charactersIndex = new DocumentIndexTyped(charactersIndexType, context, shuttedDown, documentIndexSetup, loggerFactory, optimizeHintFactory); _numberIndex = new DocumentIndexTyped(digitsIndexType, context, shuttedDown, documentIndexSetup, loggerFactory, optimizeHintFactory); }
private IDocumentIndex CreateDocumentIndex(AccountName accountName, DocumentIndexType documentIndexType, DocumentIndexSetup documentIndexSetup, IActivityLoggerFactory activityLoggerFactory) { return new DocumentIndexTyped(documentIndexType, new PluginContextMock { AccountName = accountName, ProfileName = "Qq" }, () => { }, documentIndexSetup, activityLoggerFactory, new DocumentIndexOptimizeHintFactory()); }
private IDocumentIndex CreateDocumentIndex(AccountName accountName, int version, DocumentIndexSetup documentIndexSetup, IActivityLoggerFactory activityLoggerFactory) { var indexType = new DocumentIndexType(DocumentIndexTypeToken.Entity, DocumentIndexDataTypeToken.Digits, "Entity", Enumerable.Empty<Enum>(), Enumerable.Empty<Enum>(), version, new DigitsDocumentIndexDataTypeService(), new FileService()); return CreateDocumentIndex(accountName, indexType, documentIndexSetup, activityLoggerFactory); }
private IDocumentIndex CreateDocumentIndex(AccountName accountName, DocumentIndexType documentIndexType, DocumentIndexSetup documentIndexSetup, IActivityLoggerFactory activityLoggerFactory) { return(new DocumentIndexTyped(documentIndexType, new PluginContextMock { AccountName = accountName, ProfileName = "Qq" }, () => { }, documentIndexSetup, activityLoggerFactory, new DocumentIndexOptimizeHintFactory())); }
private IDocumentIndex CreateDocumentIndex(AccountName accountName, int version, DocumentIndexSetup documentIndexSetup, IActivityLoggerFactory activityLoggerFactory) { var indexType = new DocumentIndexType(DocumentIndexTypeToken.Entity, DocumentIndexDataTypeToken.Digits, "Entity", Enumerable.Empty <Enum>(), Enumerable.Empty <Enum>(), version, new DigitsDocumentIndexDataTypeService(), new FileService()); return(CreateDocumentIndex(accountName, indexType, documentIndexSetup, activityLoggerFactory)); }