private static string getLuceneDirectory(LuceneSearchType searchType) { string lucenePath = HttpContext.Current.Request.PhysicalApplicationPath + "Lucene_Index\\"; DirectoryInfo diLucenePath = new DirectoryInfo(lucenePath); if (!diLucenePath.Exists) diLucenePath.Create(); string _luceneDir = Path.Combine(lucenePath + searchType.ToString() + "_index"); diLucenePath = new DirectoryInfo(_luceneDir); if (!diLucenePath.Exists) diLucenePath.Create(); return _luceneDir; }