// For complete examples and data files, please go to https://github.com/groupdocs-search/GroupDocs.Search-for-.NET
Index index = new Index(Utilities.indexPath);
index.AddToIndex(Utilities.documentsPath);
SearchParameters parameters = new SearchParameters();
SearchResults regexSearchResults = index.Search(searchString);
foreach (DocumentResultInfo documentResultInfo in regexSearchResults)
{
Console.WriteLine("Document {0} was found with query \"{1}\"\nWords list that was found in document:", documentResultInfo.FileName, regexSearchResults);
foreach (string term in documentResultInfo.Terms)
{
Console.Write("{0}; ", term);
}
Console.WriteLine();
}