We are proudly announcing the monthly release of GroupDocs.Search for .NET 18.8. Using the latest version, you can now cancel all operations in IndexRepository. We would recommend you to install and use the latest version of the API.
Following are the enhancements introduced in the latest version:
Breaking functionality for IndexRepository Class
Using the latest version you can now cancel the operations in all indexes in the index repository. The cancelling is not instantaneous and in cases of operations with large documents, the breaking can take about a second. The following code snippet shows how to break the updating operation:
string indexFolder = "c:\\MyIndex\\"; string documentsFolder = "c:\\MyDocuments\\"; IndexRepository repository = new IndexRepository(); Index index = repository.Create(indexFolder ); index.AddToIndexAsync(indexFolder); // Breaking all processes in all indexes in repository repository.Break();
You can also cancel the operation using Cancellation object. The following code snippet breaks the updating operation with Cancellation object:
string documentsFolder = "c:\\MyDocuments\\"; IndexRepository repository = new IndexRepository(); Index index = repository.Create(); index.AddToIndex(documentsFolder); Cancellation cnc = new Cancellation(); // Updating all indexes in repository repository.UpdateAsync(cnc); // Canceling all operations in index repository cnc.Cancel();
For more details on this feature, please visit this documentation article.
Available Channels and Resources
Here are a few channels and resources for you to download, try, learn and get technical support on GroupDocs.Search:
- Installation – Install GroupDocs.Search using NuGet
- Documentation – Product docs
- Examples/Plugins/Showcases – Examples and Open Source Application
- Video Tutorials – YouTube Videos
- Product Support Forum – Technical Support Forum for GroupDocs.Search