Skip to end of metadata
Go to start of metadata
Contents Summary
 

The code in below examples uses some methods defined in Common Utilities

This feature is supported by version 18.2 or greater.

Implementing Multi-Threaded Indexing

Using GroupDocs.Search API you can perform indexing in multiple threads. Multi-Threaded indexing is faster, but uses more memory and may cause memory overflow error. If you have only 8 GB of RAM installed it is recommended to use not more than 2 threads for indexing. If you have 16 GB of RAM installed you can use 4 threads for indexing. Note that there is a restriction on the use of more than 4 threads.

The Recipe

  • Declare an Index object
  • Add index with two threads using Index.AddToIndex("C:/DocumentsFolder/", 2)

The Code

Implementing Multi-Threaded Async Indexing

GroupDocs.Search API also allows you to run multi-threaded indexing asynchronously using Index.AddToIndexAsync() method.

The Recipe

  • Declare an Index object
  • Add index with two threads using Index.AddToIndexAsync("C:/DocumentsFolder/", 2)

The Code

Labels
  • No labels