public DocumentIndexSetup Load() { int aliveTimeoutInMinutes = PluginSettings.LoadInt(IndexAliveTimeoutInMinutesName, 10); int deferredOptimizeCallsOnChange = PluginSettings.LoadInt(DeferredOptimizeCallsOnChangeName, 1); DeferredOptimizeType optimizeType = PluginSettings.LoadEnum(DeferredOptimizeTypeName, DeferredOptimizeType.None); int checkIntervalInMinutes = PluginSettings.LoadInt(SearchCheckIntervalInMinutesName, aliveTimeoutInMinutes); int?managedMemoryThresholdInMb = PluginSettings.LoadInt(ManagedMemoryThresholdInMbName); var folder = new PluginDataFolder(); return(new DocumentIndexSetup(indexPath: folder.Path, minStringLengthToSearch: 2, maxStringLengthIgnore: 60, aliveTimeoutInMinutes: aliveTimeoutInMinutes, deferredOptimizeCounter: deferredOptimizeCallsOnChange, deferredOptimizeType: optimizeType, checkIntervalInMinutes: checkIntervalInMinutes, managedMemoryThresholdInMb: managedMemoryThresholdInMb)); }