GroupDocs.Search for .NET 24.5 Release Notes
This page contains release notes for GroupDocs.Search for .NET 24.5
Major Features
There are the following features, enhancements, and fixes in this release:
- Implement loading an index from disk into memory completely
Full List of Issues Covering all Changes in this Release
Key | Summary | Category |
---|---|---|
SEARCHNET-3137 | Implement loading an index from disk into memory completely | Feature |
Public API and Backward Incompatible Changes
Implement loading an index from disk into memory completely
This feature allows you to load a regular index from disk into memory completely, thereby speeding up its operation. Note that you must explicitly call the SaveTo method to save any changes to the index.
Public API changes
Method GroupDocs.Search.Index LoadIntoMemoryCompletely(System.String) has been added to GroupDocs.Search.Index class.
Method GroupDocs.Search.Index LoadIntoMemoryCompletely(System.String, GroupDocs.Search.IndexSettings) has been added to GroupDocs.Search.Index class.
Use cases
The following example shows how to completely load an index into memory to improve its performance.
C#
string indexFolder = @"c:\MyIndex\";
string documentsFolder = @"c:\MyDocuments\";
// Creating a regular index on disk
Index index = new Index(indexFolder);
// Indexing documents from the specified folder
index.Add(documentsFolder);
// Closing the regular index
index.Dispose();
// Loading the index entirely in memory for increased performance
Index inMemoryIndex = Index.LoadIntoMemoryCompletely(indexFolder);
// Searching in the index
string query = "focus";
SearchResult result = inMemoryIndex.Search(query);