Re-indexes documents that have been changed or deleted since last update. Adds new files that have been added to the indexed folders.
publicvoidUpdate()
Examples
The example demonstrates how to update an index.
stringindexFolder=@"c:\MyIndex\";stringdocumentsFolder=@"c:\MyDocuments\";Indexindex=newIndex(indexFolder);// Creating index in the specified folderindex.Add(documentsFolder);// Indexing documents from the specified folder// Delete documents from the documents folder or modify them or add new documents to the folderindex.Update();// Updating the index
Re-indexes documents that have been changed or deleted since last update. Adds new files that have been added to the indexed folders.
publicvoidUpdate(UpdateOptionsoptions)
Parameter
Type
Description
options
UpdateOptions
The update options.
Examples
The example demonstrates how to update an index with particular update options.
stringindexFolder=@"c:\MyIndex\";stringdocumentsFolder=@"c:\MyDocuments\";Indexindex=newIndex(indexFolder);// Creating index in the specified folderindex.Add(documentsFolder);// Indexing documents from the specified folder// Delete documents from the documents folder or modify them or add new documents to the folderUpdateOptionsoptions=newUpdateOptions();options.Threads=2;// Setting the number of indexing threadsindex.Update(options);// Updating the index