HI.
//index settings AutoDetectEncoding
IndexSettings settings = new IndexSettings();
settings.AutoDetectEncoding = true;
//index class with async option
Index index = new Index(indexPath, settings);
index.Events.OperationFinished += (sender, args) =>
{
// Writing operation details to the console
Console.WriteLine("Operation finished: " + args.OperationType);
Console.WriteLine("Message: " + args.Message);
Console.WriteLine("Index folder: " + args.IndexFolder);
Console.WriteLine("Time: " + args.Time);
};
IndexingOptions options = new IndexingOptions();
options.IsAsync = true;
string[] filesList = System.IO.Directory.GetFiles(indexPath, "*.body");
if (filesList.Length == 0)
{
index.Add(storagePath,options);
}
else
{
UpdateOptions updateOptions = new UpdateOptions();
index.Update(updateOptions);
//MergeOptions mergeOptions = new MergeOptions();
//index.Optimize(mergeOptions);
}
i had written the above code.when debugger reaches the index.add() and completes,it should go to the following event right?,
index.Events.OperationFinished += (sender, args) =>
{
// Writing operation details to the console
Console.WriteLine("Operation finished: " + args.OperationType);
Console.WriteLine("Message: " + args.Message);
Console.WriteLine("Index folder: " + args.IndexFolder);
Console.WriteLine("Time: " + args.Time);
};
but its not going back to this event.
actually i wish to know the status of the index and update the data in db