Created
November 22, 2019 05:29
-
-
Save GroupDocsGists/eaa4ea35ded2e19f062eb12d7499fcdb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string indexFolder = @"D://Samples/Index"; | |
string documentsFolder = @"D://Samples/Source/Index"; | |
// Creating index in the specified folder | |
Index index = new Index(indexFolder); | |
// Indexing documents from the specified folder | |
index.Add(documentsFolder); | |
// Searching in index | |
SearchResult result = index.Search("video"); | |
foreach (FoundDocument document in result) | |
{ | |
Console.WriteLine("Document Path : " + document.DocumentInfo.FilePath); | |
Console.WriteLine("Occurance : " + document.OccurrenceCount + "\n"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment