Hi,I have used the following code to search keyword.Keyword is available in document but i’m not getting search result.
string indexFolder = "C:\\Store\\IndexStore\\";
string documentsFolder = "C:\\DocumentStorage1\\";
Index index = new Index(indexFolder);
index.Events.ErrorOccurred += (sender, args) =>
{
Console.WriteLine(args.Message); // Writing error messages to the console
};
index.Add(documentsFolder); // Synchronous indexing documents from the specified folder
string query = "INSTALLED"; // Specify a search query
SearchResult result = index.Search(query); // Searching in the index
for (int i = 0; i < result.DocumentCount; i++)
{
FoundDocument document = result.GetFoundDocument(i);
Console.WriteLine("\tDocument: " + document.DocumentInfo.FilePath);
Console.WriteLine("\tOccurrences: " + document.OccurrenceCount);
}
DES_Test.pdf (1.2 MB)