diff --git a/build/NuSpecs/UmbracoCms.Core.nuspec b/build/NuSpecs/UmbracoCms.Core.nuspec index 2d738475db..eb6fabe720 100644 --- a/build/NuSpecs/UmbracoCms.Core.nuspec +++ b/build/NuSpecs/UmbracoCms.Core.nuspec @@ -32,7 +32,7 @@ - + diff --git a/src/Umbraco.Tests/Umbraco.Tests.csproj b/src/Umbraco.Tests/Umbraco.Tests.csproj index 60e57f91f0..ff8b53717f 100644 --- a/src/Umbraco.Tests/Umbraco.Tests.csproj +++ b/src/Umbraco.Tests/Umbraco.Tests.csproj @@ -58,9 +58,9 @@ ..\packages\AutoMapper.3.0.0\lib\net40\AutoMapper.Net4.dll - + False - ..\packages\Examine.0.1.59.2941\lib\Examine.dll + ..\packages\Examine.0.1.60.2941\lib\Examine.dll False diff --git a/src/Umbraco.Tests/packages.config b/src/Umbraco.Tests/packages.config index d548c63204..9da519e0ef 100644 --- a/src/Umbraco.Tests/packages.config +++ b/src/Umbraco.Tests/packages.config @@ -2,7 +2,7 @@ - + diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj index 3cffa798c0..9649ab9cc4 100644 --- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj +++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj @@ -127,9 +127,9 @@ False ..\packages\dotless.1.4.1.0\lib\dotless.Core.dll - - False - ..\packages\Examine.0.1.59.2941\lib\Examine.dll + + ..\packages\Examine.0.1.60.2941\lib\Examine.dll + True False diff --git a/src/Umbraco.Web.UI/packages.config b/src/Umbraco.Web.UI/packages.config index 680878e107..e58593a7c9 100644 --- a/src/Umbraco.Web.UI/packages.config +++ b/src/Umbraco.Web.UI/packages.config @@ -4,7 +4,7 @@ - + diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 2dec8c27f6..e554b88b15 100644 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -115,9 +115,9 @@ ..\packages\dotless.1.4.1.0\lib\dotless.Core.dll - + False - ..\packages\Examine.0.1.59.2941\lib\Examine.dll + ..\packages\Examine.0.1.60.2941\lib\Examine.dll False diff --git a/src/Umbraco.Web/packages.config b/src/Umbraco.Web/packages.config index 9adab52a05..c402c73aea 100644 --- a/src/Umbraco.Web/packages.config +++ b/src/Umbraco.Web/packages.config @@ -3,7 +3,7 @@ - + diff --git a/src/UmbracoExamine.PDF/UmbracoExamine.PDF.csproj b/src/UmbracoExamine.PDF/UmbracoExamine.PDF.csproj index c1f220676e..0222d6976f 100644 --- a/src/UmbracoExamine.PDF/UmbracoExamine.PDF.csproj +++ b/src/UmbracoExamine.PDF/UmbracoExamine.PDF.csproj @@ -46,9 +46,9 @@ false - + False - ..\packages\Examine.0.1.59.2941\lib\Examine.dll + ..\packages\Examine.0.1.60.2941\lib\Examine.dll False diff --git a/src/UmbracoExamine.PDF/packages.config b/src/UmbracoExamine.PDF/packages.config index b4149306f2..df682e6454 100644 --- a/src/UmbracoExamine.PDF/packages.config +++ b/src/UmbracoExamine.PDF/packages.config @@ -1,6 +1,6 @@  - + diff --git a/src/UmbracoExamine/BaseUmbracoIndexer.cs b/src/UmbracoExamine/BaseUmbracoIndexer.cs index 48fcb85699..fef78cf811 100644 --- a/src/UmbracoExamine/BaseUmbracoIndexer.cs +++ b/src/UmbracoExamine/BaseUmbracoIndexer.cs @@ -70,6 +70,20 @@ namespace UmbracoExamine #region Properties + public bool UseTempStorage + { + get { return _localTempStorageHelper.LuceneDirectory != null; } + } + + public string TempStorageLocation + { + get + { + if (UseTempStorage == false) return string.Empty; + return _localTempStorageHelper.TempPath; + } + } + /// /// If true, the IndexingActionHandler will be run to keep the default index up to date. /// @@ -142,12 +156,7 @@ namespace UmbracoExamine EnableDefaultEventHandler = enabled; } - DataService.LogService.AddVerboseLog(-1, string.Format("{0} indexer initializing", name)); - - //Before we initialize the base provider which is going to setup all of the directory structures based on the index - // set, we want to dynamically override the index working folder based on a given token. Currently we only support one - // and that is {machinename} - ExamineHelper.ReplaceTokensInIndexPath(name, config, "Indexer", () => IndexerData != null); + DataService.LogService.AddVerboseLog(-1, string.Format("{0} indexer initializing", name)); base.Initialize(name, config); @@ -174,7 +183,7 @@ namespace UmbracoExamine get { //if temp local storage is configured use that, otherwise return the default - if (_localTempStorageHelper.LuceneDirectory != null) + if (UseTempStorage) { //create one if one has not been created already return _internalTempStorageSearcher @@ -188,7 +197,7 @@ namespace UmbracoExamine public override Lucene.Net.Store.Directory GetLuceneDirectory() { //if temp local storage is configured use that, otherwise return the default - if (_localTempStorageHelper.LuceneDirectory != null) + if (UseTempStorage) { return _localTempStorageHelper.LuceneDirectory; } @@ -200,10 +209,10 @@ namespace UmbracoExamine protected override IndexWriter CreateIndexWriter() { //if temp local storage is configured use that, otherwise return the default - if (_localTempStorageHelper.LuceneDirectory != null) + if (UseTempStorage) { var directory = GetLuceneDirectory(); - return new IndexWriter(directory, IndexingAnalyzer, + return new IndexWriter(GetLuceneDirectory(), IndexingAnalyzer, DeletePolicyTracker.Current.GetPolicy(directory), IndexWriter.MaxFieldLength.UNLIMITED); } diff --git a/src/UmbracoExamine/ExamineHelper.cs b/src/UmbracoExamine/ExamineHelper.cs index 0241c5b068..2df27390cc 100644 --- a/src/UmbracoExamine/ExamineHelper.cs +++ b/src/UmbracoExamine/ExamineHelper.cs @@ -12,23 +12,7 @@ namespace UmbracoExamine { internal class ExamineHelper { - /// - /// Used to replace any available tokens in the index path before the lucene directory is assigned to the path - /// - /// - /// - /// - /// - public static void ReplaceTokensInIndexPath(string name, System.Collections.Specialized.NameValueCollection config, string matchingVerb, Func alreadyConfiguredCheck) - { - var indexSet = GetConfiguredIndexSet(name, config, matchingVerb, alreadyConfiguredCheck); - if (indexSet == null) return; - indexSet.IndexPath = indexSet.IndexPath - .Replace("{machinename}", NetworkHelper.FileSafeMachineName) - .Replace("{appdomainappid}", HttpRuntime.AppDomainAppId.ReplaceNonAlphanumericChars("")) - .EnsureEndsWith('/'); - } - + public static IndexSet GetConfiguredIndexSet(string name, System.Collections.Specialized.NameValueCollection config, string matchingVerb, Func alreadyConfiguredCheck) { //Need to check if the index set or IndexerData is specified... diff --git a/src/UmbracoExamine/UmbracoExamine.csproj b/src/UmbracoExamine/UmbracoExamine.csproj index de826ed659..a9ae64e70d 100644 --- a/src/UmbracoExamine/UmbracoExamine.csproj +++ b/src/UmbracoExamine/UmbracoExamine.csproj @@ -82,9 +82,9 @@ ..\Solution Items\TheFARM-Public.snk - + False - ..\packages\Examine.0.1.59.2941\lib\Examine.dll + ..\packages\Examine.0.1.60.2941\lib\Examine.dll False diff --git a/src/UmbracoExamine/UmbracoExamineSearcher.cs b/src/UmbracoExamine/UmbracoExamineSearcher.cs index 7d5c8b7776..f193939416 100644 --- a/src/UmbracoExamine/UmbracoExamineSearcher.cs +++ b/src/UmbracoExamine/UmbracoExamineSearcher.cs @@ -69,11 +69,6 @@ namespace UmbracoExamine return; } - //Before we initialize the base provider which is going to setup all of the directory structures based on the index - // set, we want to dynamically override the index working folder based on a given token. Currently we only support one - // and that is {machinename} - ExamineHelper.ReplaceTokensInIndexPath(name, config, "Searcher", () => LuceneIndexFolder != null); - base.Initialize(name, config); if (config != null && config["useTempStorage"] != null) diff --git a/src/UmbracoExamine/packages.config b/src/UmbracoExamine/packages.config index ea08897b32..f30abc56f9 100644 --- a/src/UmbracoExamine/packages.config +++ b/src/UmbracoExamine/packages.config @@ -1,6 +1,6 @@  - + \ No newline at end of file diff --git a/src/umbraco.MacroEngines/packages.config b/src/umbraco.MacroEngines/packages.config index ca995d7c13..831117f5e5 100644 --- a/src/umbraco.MacroEngines/packages.config +++ b/src/umbraco.MacroEngines/packages.config @@ -1,6 +1,6 @@  - + diff --git a/src/umbraco.MacroEngines/umbraco.MacroEngines.csproj b/src/umbraco.MacroEngines/umbraco.MacroEngines.csproj index f6b611a6c8..456b1e5662 100644 --- a/src/umbraco.MacroEngines/umbraco.MacroEngines.csproj +++ b/src/umbraco.MacroEngines/umbraco.MacroEngines.csproj @@ -45,9 +45,9 @@ false - + False - ..\packages\Examine.0.1.59.2941\lib\Examine.dll + ..\packages\Examine.0.1.60.2941\lib\Examine.dll False