The repository does not dispose of the index: dispose of it when it is no longer needed, see Dispose.
Examples
The example demonstrates how to create an index in memory through the index repository.
IndexRepositoryindexRepository=newIndexRepository();IndexSettingssettings=newIndexSettings();settings.UseStopWords=false;// Disabling use of stop words during indexingIndexindex=indexRepository.Create(settings);
Another Index object uses the folder, in this process or in another one, or an index is saved or updated into the folder at the moment.
Remarks
The repository does not dispose of the index: dispose of it when it is no longer needed, see Dispose.
Examples
The example demonstrates how to create an index on disk through the index repository.
stringindexFolder=@"c:\MyIndex\";IndexRepositoryindexRepository=newIndexRepository();IndexSettingssettings=newIndexSettings();settings.UseStopWords=false;// Disabling use of stop words during indexingIndexindex=indexRepository.Create(indexFolder,settings);