internal FullTextIndex( IndexOptions indexOptions, ConfiguredObjectTokenizationOptions <TKey> itemTokenizationOptions, IIndexNodeFactory indexNodeFactory, IQueryParser queryParser, IIndexScorerFactory scorer, ITextExtractor defaultTextExtractor, ITokenizer defaultTokenizer, Func <IIndexSnapshot <TKey>, Task>[]?indexModifiedActions) { this.indexNavigatorPool = new IndexNavigatorPool(scorer); this.indexOptions = indexOptions; this.itemTokenizationOptions = itemTokenizationOptions ?? throw new ArgumentNullException(nameof(itemTokenizationOptions)); this.IndexNodeFactory = indexNodeFactory ?? throw new ArgumentNullException(nameof(indexNodeFactory)); this.queryParser = queryParser ?? throw new ArgumentNullException(nameof(queryParser)); this.DefaultTextExtractor = defaultTextExtractor; this.DefaultTokenizer = defaultTokenizer ?? throw new ArgumentNullException(nameof(defaultTokenizer)); this.indexModifiedActions = indexModifiedActions; this.idPool = new IdPool <TKey>(); this.FieldLookup = new IndexedFieldLookup( this.itemTokenizationOptions.GetAllConfiguredFields(), defaultTextExtractor, defaultTokenizer); this.Root = this.IndexNodeFactory.CreateRootNode(); }
internal void Initialize(IndexNode node, IIndexNavigatorPool pool) { this.pool = pool; this.currentNode = node; this.intraNodeTextPosition = 0; this.navigatedWith.Length = 0; }
internal IndexSnapshot(IIndexNavigatorPool indexNavigatorPool, FullTextIndex <TKey> index) { this.Items = index.Items.Snapshot(); this.Root = index.Root; this.indexNavigatorPool = indexNavigatorPool; // Field lookup is read-only once the index is constructed this.FieldLookup = index.FieldLookup; }