} // End Function PopulateDatabase // index particular file and check if its type matches the suffix private void IndexFileWithIndexWriter(IndexWriter indexWriter, System.IO.FileSystemInfo f, string suffix) { if (f.IsHidden() || f.IsDirectory() || !f.CanRead() || !f.Exists) { return; } if (suffix != null && !f.Name.EndsWith(suffix)) { return; } System.Console.WriteLine("Indexing file " + f.FullName); CreateDocument((System.IO.FileInfo)f, indexWriter); } // End Sub IndexFileWithIndexWriter