Optimize the search index files by compacting and removing previously deleted search documents.
Namespace: DotNetNuke.Services.Search.InternalsThe call will return immediately and the operation runs on a background thread.
Assembly: DotNetNuke (in DotNetNuke.dll)
Syntax
C# |
---|
bool OptimizeSearchIndex() |
Visual Basic |
---|
Function OptimizeSearchIndex As Boolean |
Return Value
True is optimization was scheduled to run in the background, false otherwise.
Remarks
This is a costly operation which consumes substantial CPU and I/O resources, therefore use it
judiciously. If your site has a a single server that performs both indexing and searching, then
you should consider running the optimize operation after hours or over the weekend so that it
does not interfere with ongoing search activities.