//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: private SchemaIndex createIndex() throws java.io.IOException private SchemaIndex CreateIndex() { SchemaIndex schemaIndex = NewSchemaIndex(); schemaIndex.create(); schemaIndex.open(); return(schemaIndex); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: private LuceneIndexAccessor createDefaultIndexAccessor() throws java.io.IOException private LuceneIndexAccessor CreateDefaultIndexAccessor() { SchemaIndex index = LuceneSchemaIndexBuilder.Create(_descriptor, _config).withFileSystem(_fileSystem).withIndexRootFolder(_testDir.directory("testIndex")).build(); index.create(); index.open(); return(new LuceneIndexAccessor(index, _descriptor)); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @BeforeEach void setPartitionSize() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: internal virtual void SetPartitionSize() { System.setProperty("luceneSchemaIndex.maxPartitionSize", _docsPerPartition.ToString()); Factory <IndexWriterConfig> configFactory = new TestConfigFactory(); _index = LuceneSchemaIndexBuilder.create(_descriptor, Config.defaults()).withFileSystem(_fileSystem).withIndexRootFolder(new File(_testDir.directory("uniquenessVerification"), "index")).withWriterConfig(configFactory).withDirectoryFactory(DirectoryFactory.PERSISTENT).build(); _index.create(); _index.open(); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test void updateMultiplePartitionedIndex() throws java.io.IOException //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: internal virtual void UpdateMultiplePartitionedIndex() { using (SchemaIndex index = LuceneSchemaIndexBuilder.Create(_descriptor, _config).withFileSystem(_fileSystem).withIndexRootFolder(_testDir.directory("partitionedIndexForUpdates")).build()) { index.create(); index.open(); AddDocumentToIndex(index, 45); index.IndexWriter.updateDocument(LuceneDocumentStructure.NewTermForChangeOrRemove(100), LuceneDocumentStructure.DocumentRepresentingProperties(( long )100, Values.intValue(100))); index.maybeRefreshBlocking(); long documentsInIndex = Iterators.count(index.allDocumentsReader().GetEnumerator()); assertEquals(46, documentsInIndex, "Index should contain 45 added and 1 updated document."); } }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Parameterized.Parameters(name = "{0}") public static java.util.Collection<Object[]> implementations() public static ICollection <object[]> Implementations() { //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final java.io.File dir = new java.io.File("dir"); File dir = new File("dir"); return(Arrays.asList(Arg(_generalIndex, dirFactory1 => { SchemaIndex index = LuceneSchemaIndexBuilder.Create(_generalIndex, _config).withFileSystem(FileSystemRule.get()).withDirectoryFactory(dirFactory1).withIndexRootFolder(new File(dir, "1")).build(); index.create(); index.open(); return new LuceneIndexAccessor(index, _generalIndex); }), Arg(_uniqueIndex, dirFactory1 => { SchemaIndex index = LuceneSchemaIndexBuilder.Create(_uniqueIndex, _config).withFileSystem(FileSystemRule.get()).withDirectoryFactory(dirFactory1).withIndexRootFolder(new File(dir, "testIndex")).build(); index.create(); index.open(); return new LuceneIndexAccessor(index, _uniqueIndex); }))); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Before public void setup() throws java.io.IOException //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void Setup() { _index = LuceneSchemaIndexBuilder.create(IndexDescriptorFactory.forSchema(SchemaDescriptorFactory.forLabel(1, 1)), Config.defaults()).withFileSystem(Fs).withIndexRootFolder(Directory.directory()).build(); _index.create(); _index.open(); }