Search a keyword available in the document returns no result in .NET

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)

1 Like

@bharathiGK,

We can reproduce this issue if we don’t apply license (due to evaluation limitations). However, if license is applied, we get right output. Please have a look at this screenshot.JPG (142.9 KB). Let us know if you face any issue after applying license.

Okay.thank you

1 Like

@bharathiGK,

You’re welcome.