GroupDocsGists
10/24/2017 - 1:26 PM

Examples-CSharp-GroupDocs.Search.Examples.CSharp-Searching-FacetedSearchWithBooleanSearch.cs

// For complete examples and data files, please go to https://github.com/atirtahirgroupdocs/GroupDocs.Search-for-.NET
// Create index
Index index = new Index(Utilities.indexPath);

// Add documents to index
index.AddToIndex(Utilities.documentsPath);
//Faceted search combine with boolean search
SearchResults searchResults = index.Search("Content:" + firstTerm + "OR Content:" + secondTerm);

// List of found files
foreach (DocumentResultInfo documentResultInfo in searchResults)
{
    Console.Write(documentResultInfo.FileName + "\n");
}