From 53bbc5f922e8443356fcd92cd0e2340abde39955 Mon Sep 17 00:00:00 2001 From: Shannon Date: Tue, 3 Jan 2017 19:39:34 +1100 Subject: [PATCH] U4-9335 UmbracoExamine needs to ignore the useTempStorage option if an IDirectoryFactory config option is supplied by the indexer --- src/UmbracoExamine/BaseUmbracoIndexer.cs | 3 ++- src/UmbracoExamine/UmbracoExamineSearcher.cs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/UmbracoExamine/BaseUmbracoIndexer.cs b/src/UmbracoExamine/BaseUmbracoIndexer.cs index 26763bd7cd..933e32cfff 100644 --- a/src/UmbracoExamine/BaseUmbracoIndexer.cs +++ b/src/UmbracoExamine/BaseUmbracoIndexer.cs @@ -162,7 +162,8 @@ namespace UmbracoExamine base.Initialize(name, config); - if (config["useTempStorage"] != null) + //detect if a dir factory has been specified, if so then useTempStorage will not be used (deprecated) + if (config["directoryFactory"] == null && config["useTempStorage"] != null) { var fsDir = base.GetLuceneDirectory() as FSDirectory; if (fsDir != null) diff --git a/src/UmbracoExamine/UmbracoExamineSearcher.cs b/src/UmbracoExamine/UmbracoExamineSearcher.cs index acbfefb180..efd0043e0c 100644 --- a/src/UmbracoExamine/UmbracoExamineSearcher.cs +++ b/src/UmbracoExamine/UmbracoExamineSearcher.cs @@ -73,7 +73,8 @@ namespace UmbracoExamine base.Initialize(name, config); - if (config != null && config["useTempStorage"] != null) + //detect if a dir factory has been specified, if so then useTempStorage will not be used (deprecated) + if (config != null && config["directoryFactory"] == null && config["useTempStorage"] != null) { //Use the temp storage directory which will store the index in the local/codegen folder, this is useful // for websites that are running from a remove file server and file IO latency becomes an issue