public override IndexPopulator GetPopulator(StoreIndexDescriptor descriptor, IndexSamplingConfig samplingConfig, ByteBufferFactory bufferFactory) { PartitionedIndexStorage indexStorage = GetIndexStorage(descriptor.Id); FulltextIndexDescriptor fulltextIndexDescriptor = readOrInitialiseDescriptor(descriptor, _defaultAnalyzerName, _tokenHolders.propertyKeyTokens(), indexStorage.IndexFolder, _fileSystem); DatabaseIndex <FulltextIndexReader> fulltextIndex = FulltextIndexBuilder.Create(fulltextIndexDescriptor, _config, _tokenHolders.propertyKeyTokens()).withFileSystem(_fileSystem).withOperationalMode(_operationalMode).withIndexStorage(indexStorage).withPopulatingMode(true).build(); if (fulltextIndex.ReadOnly) { throw new System.NotSupportedException("Can't create populator for read only index"); } _log.debug("Creating populator for fulltext schema index: %s", descriptor); return(new FulltextIndexPopulator(fulltextIndexDescriptor, fulltextIndex, () => FulltextIndexSettings.saveFulltextIndexSettings(fulltextIndexDescriptor, indexStorage.IndexFolder, _fileSystem))); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public org.neo4j.kernel.api.index.IndexAccessor getOnlineAccessor(org.neo4j.storageengine.api.schema.StoreIndexDescriptor descriptor, org.neo4j.kernel.impl.api.index.sampling.IndexSamplingConfig samplingConfig) throws java.io.IOException public override IndexAccessor GetOnlineAccessor(StoreIndexDescriptor descriptor, IndexSamplingConfig samplingConfig) { PartitionedIndexStorage indexStorage = GetIndexStorage(descriptor.Id); FulltextIndexDescriptor fulltextIndexDescriptor = readOrInitialiseDescriptor(descriptor, _defaultAnalyzerName, _tokenHolders.propertyKeyTokens(), indexStorage.IndexFolder, _fileSystem); FulltextIndexBuilder fulltextIndexBuilder = FulltextIndexBuilder.Create(fulltextIndexDescriptor, _config, _tokenHolders.propertyKeyTokens()).withFileSystem(_fileSystem).withOperationalMode(_operationalMode).withIndexStorage(indexStorage).withPopulatingMode(false); if (fulltextIndexDescriptor.EventuallyConsistent) { fulltextIndexBuilder = fulltextIndexBuilder.WithIndexUpdateSink(_indexUpdateSink); } DatabaseFulltextIndex fulltextIndex = fulltextIndexBuilder.Build(); fulltextIndex.open(); ThreadStart onClose = () => _openOnlineAccessors.remove(descriptor); FulltextIndexAccessor accessor = new FulltextIndexAccessor(_indexUpdateSink, fulltextIndex, fulltextIndexDescriptor, onClose); _openOnlineAccessors.put(descriptor, accessor); _log.debug("Created online accessor for fulltext schema index %s: %s", descriptor, accessor); return(accessor); }