Create an index and define a text analyzer // Ensures index backward compatibility const LuceneVersion AppLuceneVersion = LuceneVersion.LUCENE_48; // Construct a machine-independent path for the index var basePath = Environment.GetFolderPath( Environment.SpecialFolder.CommonApplicationData); var indexPath = Path.Combine(basePath, "index"); using var dir = FSDirectory.Open(indexPath); // Create an