public DefaultDocumentFactory(IStorageIndex index, IDocumentBuilderFactory factory, IJSchemaGenerator generator) { this.index = index; this.factory = factory; this.generator = generator; this.serializer = index.Configuration.Serializer; }
protected AbstractDocumentBuilder(IStorageIndex index, string contentType) { this.contentType = contentType; Document = new Document(); configuration = index.Configuration; }
public ContentService(IStorageIndex index, IStorageArea area, IStorageIndexManager manager, IPipeline pipeline, IJsonMergeVisitor merger, ILogger performance) { this.index = index; this.area = area; this.manager = manager; this.pipeline = pipeline; this.performance = performance; this.merger = new ContentMergeService(merger, area); }
public void TestFixtureSetUp() { index.Configuration .SetTypeResolver("type") .SetAreaResolver("area") .ForAll().SetIdentity("id"); index = TestObjects(1000).Aggregate( index, (idx, json) => idx.Write(json)); }
public XmlStorage(IStorageDriver storageDriver, IStorageIndex index) { storageDriver.ThrowIfNull(nameof(storageDriver)); index.ThrowIfNull(nameof(index)); _driver = storageDriver; _index = index; ClearFilesAndIndex(); }
//TODO: To many dependencies, refactor! public StorageIndexManager(IStorageIndex index, IStorageContext storage, IWebHostConfiguration configuration, IWebScheduler scheduler, IInitializationTracker tracker, IDiagnosticsLogger logger) { this.index = index; this.debugging = configuration.Index.Debugging; if (this.debugging) { this.index.Writer.InfoEvent += (sender, args) => logger.Log("indexdebug", Severity.Critical, args.Message, new { args }); } this.scheduler = scheduler; this.tracker = tracker; this.logger = logger; interval = TimeSpan.FromSeconds(configuration.Index.Watch.Interval); if (!string.IsNullOrEmpty(configuration.Index.Watch.RamBuffer)) { buffer = (int)AdvConvert.ConvertToByteCount(configuration.Index.Watch.RamBuffer) / (1024 * 1024); } watchers = configuration.Index.Watch.Items .ToDictionary(we => we.Area, we => (IStorageIndexChangeLogWatcher) new StorageChangeLogWatcher(we.Area, storage.Area(we.Area).Log, we.BatchSize < 1 ? configuration.Index.Watch.BatchSize : we.BatchSize, logger, InfoStream)); }
public virtual ISchemaCollection CreateSchemaCollection(IStorageIndex index) { return(new SchemaCollection()); }
public DefaultDocumentBuilder(IStorageIndex index, string contentType) : base(index, contentType) { }
public MultiFieldQueryParser(IStorageIndex index, string query) : this(index, query, index.Schemas.AllFields().ToArray()) { }
public MultiFieldQueryParser(IStorageIndex index, string query, params string[] fields) : base(index.Version, null, index.Analyzer) { this.fields = fields; this.index = index; }
public LuceneSearcher(IStorageIndex index) : this(index, new LuceneQueryBuilder(index)) { }
public DefaultDocumentBuilderFactory(IStorageIndex index) { this.index = index; }
public TestIndexBuilder(IStorageIndex index) { this.index = index; index.Configuration.SetTypeResolver("contentType").ForAll().SetIdentity("id"); }
public LuceneQueryBuilder(IStorageIndex index, IJObjectEnumarator enumarator) { this.index = index; this.enumarator = enumarator; }
public FileService(IStorageIndex index, IStorageArea area) { this.index = index; this.area = area; }
public ContentServiceProvider(IStorageIndex index, IStorageContext context, IStorageIndexManager manager, IPipeline pipeline, IJsonMergeVisitor merger, ILogger performance) : base(name => new ContentService(index, context.Area(name), manager, pipeline, merger, performance)) { this.context = context; }
public SearchService(IStorageIndex index, IPipeline pipeline, ILogger performance) { this.index = index; this.pipeline = pipeline; this.performance = performance; }
protected virtual void Configure(IStorageIndex index) { }
public DefaultDocumentFactory(IStorageIndex index) : this(index, new DefaultDocumentBuilderFactory(index), new JSchemaGenerator()) { }
public virtual IDocumentFactory CreateDocumentFactory(IStorageIndex index) { return(new DefaultDocumentFactory(index)); }
//TODO: Currently there is only one index, in the future we might wan't to make a mapping between areas and multiple indexes. // or alternatively switch to a 1:1 strategy where we then just have to perform multiple searches if we wish to lookup across. public SearchServiceProvider(IStorageIndex index, IPipeline pipeline, ILogger performance) : base(name => new SearchService(index, pipeline, performance)) { }
public virtual ILuceneSearcher CreateSearcher(IStorageIndex index) { return(new LuceneSearcher(index)); }
public SearchResultCollector(Query query, IStorageIndex index) { this.Query = query; this.index = index; }
public LuceneSearcher(IStorageIndex index, IQueryBuilder queryBuilder) { this.index = index; this.queryBuilder = queryBuilder; }
protected virtual void Initialize(IStorageIndex index) { }
public LuceneQueryBuilder(IStorageIndex index) : this(index, new JObjectEnumerator()) { }
public TermService(IStorageIndex index) { this.index = index; }
public FileServiceProvider(IStorageContext storage, IStorageIndex index) : base(name => new FileService(index, storage.Area(name))) { }
public void TestSetup() { _driver = Substitute.For <IStorageDriver>(); _index = Substitute.For <IStorageIndex>(); _info = new DataInfo("test data"); }