-
- {{indexer.name}}
-
-
- {{indexer.name}}
-
-
+
+
The index cannot be read and will need to be rebuilt
+
+
+ {{indexer.name}}
+
+
-
-
-
+
-
Index info & tools
-
-
+
-
-
+
+
+
The process is taking longer than expected, check the umbraco log to see if there have been any errors during this operation
-
-
-
- | Documents in index |
- {{indexer.documentCount}} |
-
-
- | Fields in index |
- {{indexer.fieldCount}} |
-
-
-
-
- Node types
-
-
- | Include node types |
- {{indexer.indexCriteria.IncludeNodeTypes | json}} |
-
-
- | Exclude node types |
- {{indexer.indexCriteria.ExcludeNodeTypes | json}} |
-
-
- | Parent node id |
- {{indexer.indexCriteria.ParentNodeId}} |
-
-
-
-
-
- System fields
-
-
-
-
- | Name |
- Enable sorting |
- Type |
-
-
-
-
- | {{field.Name}} |
- {{field.EnableSorting}} |
- {{field.Type}} |
-
-
-
-
-
-
- User fields
-
-
-
-
- | Name |
- Enable sorting |
- Type |
-
-
-
-
- | {{field.Name}} |
- {{field.EnableSorting}} |
- {{field.Type}} |
-
-
-
-
-
- Provider properties
+ Index properties
diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
index f33df18a54..a17168b42c 100644
--- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
+++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
@@ -88,7 +88,7 @@
-
+
diff --git a/src/Umbraco.Web/Editors/ExamineManagementController.cs b/src/Umbraco.Web/Editors/ExamineManagementController.cs
index ec6f1841b0..d54c67ddb7 100644
--- a/src/Umbraco.Web/Editors/ExamineManagementController.cs
+++ b/src/Umbraco.Web/Editors/ExamineManagementController.cs
@@ -121,7 +121,7 @@ namespace Umbraco.Web.Editors
///
public ExamineIndexModel PostCheckRebuildIndex(string indexerName)
{
- var msg = ValidateLuceneIndexer(indexerName, out LuceneIndexer indexer);
+ var msg = ValidateLuceneIndexer(indexerName, out LuceneIndex indexer);
if (msg.IsSuccessStatusCode)
{
var cacheKey = "temp_indexing_op_" + indexerName;
@@ -130,7 +130,7 @@ namespace Umbraco.Web.Editors
//if its still there then it's not done
return found != null
? null
- : CreateModel(new KeyValuePair(indexerName, indexer));
+ : CreateModel(new KeyValuePair(indexerName, indexer));
}
throw new HttpResponseException(msg);
@@ -143,7 +143,7 @@ namespace Umbraco.Web.Editors
///
public HttpResponseMessage PostRebuildIndex(string indexerName)
{
- var msg = ValidateLuceneIndexer(indexerName, out LuceneIndexer indexer);
+ var msg = ValidateLuceneIndexer(indexerName, out LuceneIndex indexer);
if (msg.IsSuccessStatusCode)
{
_logger.Info("Rebuilding index '{IndexerName}'", indexerName);
@@ -185,7 +185,7 @@ namespace Umbraco.Web.Editors
- private ExamineIndexModel CreateModel(KeyValuePair indexerKeyVal)
+ private ExamineIndexModel CreateModel(KeyValuePair indexerKeyVal)
{
var indexer = indexerKeyVal.Value;
var indexName = indexerKeyVal.Key;
@@ -249,7 +249,7 @@ namespace Umbraco.Web.Editors
}
private HttpResponseMessage ValidateLuceneIndexer(string indexerName, out T indexer)
- where T : class, IIndexer
+ where T : class, IIndex
{
indexer = null;
@@ -270,7 +270,7 @@ namespace Umbraco.Web.Editors
//static listener so it's not GC'd
private void Indexer_IndexOperationComplete(object sender, EventArgs e)
{
- var indexer = (LuceneIndexer) sender;
+ var indexer = (LuceneIndex) sender;
//ensure it's not listening anymore
indexer.IndexOperationComplete -= Indexer_IndexOperationComplete;
diff --git a/src/Umbraco.Web/ExamineStartup.cs b/src/Umbraco.Web/ExamineStartup.cs
deleted file mode 100644
index f3a8bc3ef5..0000000000
--- a/src/Umbraco.Web/ExamineStartup.cs
+++ /dev/null
@@ -1,212 +0,0 @@
-// fixme - Examine is borked
-// this cannot compile because it seems to require some changes that are not in Examine v2
-// this should *not* exist, see ExamineComponent instead, which handles everything about Examine
-
-//using System;
-//using System.Collections.Generic;
-//using System.Linq;
-//using Examine;
-//using Examine.Config;
-//using Examine.LuceneEngine;
-//using Examine.LuceneEngine.Providers;
-//using Examine.Providers;
-//using Lucene.Net.Index;
-//using Lucene.Net.Store;
-//using Umbraco.Core;
-//using Umbraco.Core.Logging;
-//using UmbracoExamine;
-
-//namespace Umbraco.Web
-//{
-// ///
-// /// Used to configure Examine during startup for the web application
-// ///
-// internal class ExamineStartup
-// {
-// private readonly List _indexesToRebuild = new List();
-// private readonly ApplicationContext _appCtx;
-// private readonly ProfilingLogger _profilingLogger;
-// private static bool _isConfigured = false;
-
-// //this is used if we are not the MainDom, in which case we need to ensure that if indexes need rebuilding that this
-// //doesn't occur since that should only occur when we are MainDom
-// private bool _disableExamineIndexing = false;
-
-// public ExamineStartup(ApplicationContext appCtx)
-// {
-// _appCtx = appCtx;
-// _profilingLogger = appCtx.ProfilingLogger;
-// }
-
-// ///
-// /// Called during the initialize operation of the boot manager process
-// ///
-// public void Initialize()
-// {
-// //We want to manage Examine's appdomain shutdown sequence ourselves so first we'll disable Examine's default behavior
-// //and then we'll use MainDom to control Examine's shutdown
-// ExamineManager.DisableDefaultHostingEnvironmentRegistration();
-
-// //we want to tell examine to use a different fs lock instead of the default NativeFSFileLock which could cause problems if the appdomain
-// //terminates and in some rare cases would only allow unlocking of the file if IIS is forcefully terminated. Instead we'll rely on the simplefslock
-// //which simply checks the existence of the lock file
-// DirectoryTracker.DefaultLockFactory = d =>
-// {
-// var simpleFsLockFactory = new NoPrefixSimpleFsLockFactory(d);
-// return simpleFsLockFactory;
-// };
-
-// //This is basically a hack for this item: http://issues.umbraco.org/issue/U4-5976
-// // when Examine initializes it will try to rebuild if the indexes are empty, however in many cases not all of Examine's
-// // event handlers will be assigned during bootup when the rebuilding starts which is a problem. So with the examine 0.1.58.2941 build
-// // it has an event we can subscribe to in order to cancel this rebuilding process, but what we'll do is cancel it and postpone the rebuilding until the
-// // boot process has completed. It's a hack but it works.
-// ExamineManager.Instance.BuildingEmptyIndexOnStartup += OnInstanceOnBuildingEmptyIndexOnStartup;
-
-// //let's deal with shutting down Examine with MainDom
-// var examineShutdownRegistered = _appCtx.MainDom.Register(() =>
-// {
-// using (_profilingLogger.TraceDuration("Examine shutting down"))
-// {
-// //Due to the way Examine's own IRegisteredObject works, we'll first run it with immediate=false and then true so that
-// //it's correct subroutines are executed (otherwise we'd have to run this logic manually ourselves)
-// ExamineManager.Instance.Stop(false);
-// ExamineManager.Instance.Stop(true);
-// }
-// });
-// if (examineShutdownRegistered)
-// {
-// _profilingLogger.Logger.Debug("Examine shutdown registered with MainDom");
-// }
-// else
-// {
-// _profilingLogger.Logger.Debug("Examine shutdown not registered, this appdomain is not the MainDom");
-
-// //if we could not register the shutdown examine ourselves, it means we are not maindom! in this case all of examine should be disabled
-// //from indexing anything on startup!!
-// _disableExamineIndexing = true;
-// Suspendable.ExamineEvents.SuspendIndexers();
-// }
-// }
-
-// ///
-// /// Called during the Complete operation of the boot manager process
-// ///
-// public void Complete()
-// {
-// EnsureUnlockedAndConfigured();
-
-// //Ok, now that everything is complete we'll check if we've stored any references to index that need rebuilding and run them
-// // (see the initialize method for notes) - we'll ensure we remove the event handler too in case examine manager doesn't actually
-// // initialize during startup, in which case we want it to rebuild the indexes itself.
-// ExamineManager.Instance.BuildingEmptyIndexOnStartup -= OnInstanceOnBuildingEmptyIndexOnStartup;
-
-// //don't do anything if we have disabled this
-// if (_disableExamineIndexing == false)
-// {
-// foreach (var indexer in _indexesToRebuild)
-// {
-// indexer.RebuildIndex();
-// }
-// }
-// }
-
-// ///
-// /// Called to perform the rebuilding indexes on startup if the indexes don't exist
-// ///
-// public void RebuildIndexes()
-// {
-// //don't do anything if we have disabled this
-// if (_disableExamineIndexing) return;
-
-// EnsureUnlockedAndConfigured();
-
-// //If the developer has explicitly opted out of rebuilding indexes on startup then we
-// // should adhere to that and not do it, this means that if they are load balancing things will be
-// // out of sync if they are auto-scaling but there's not much we can do about that.
-// if (ExamineSettings.Instance.RebuildOnAppStart == false) return;
-
-// foreach (var indexer in GetIndexesForColdBoot())
-// {
-// indexer.RebuildIndex();
-// }
-// }
-
-// ///
-// /// The method used to create indexes on a cold boot
-// ///
-// ///
-// /// A cold boot is when the server determines it will not (or cannot) process instructions in the cache table and
-// /// will rebuild it's own caches itself.
-// ///
-// public IEnumerable GetIndexesForColdBoot()
-// {
-// // NOTE: This is IMPORTANT! ... we don't want to rebuild any index that is already flagged to be re-indexed
-// // on startup based on our _indexesToRebuild variable and how Examine auto-rebuilds when indexes are empty.
-// // This callback is used above for the DatabaseServerMessenger startup options.
-
-// // all indexes
-// IEnumerable indexes = ExamineManager.Instance.IndexProviderCollection;
-
-// // except those that are already flagged
-// // and are processed in Complete()
-// if (_indexesToRebuild.Any())
-// indexes = indexes.Except(_indexesToRebuild);
-
-// // return
-// foreach (var index in indexes)
-// yield return index;
-// }
-
-// ///
-// /// Must be called to configure each index and ensure it's unlocked before any indexing occurs
-// ///
-// ///
-// /// Indexing rebuilding can occur on a normal boot if the indexes are empty or on a cold boot by the database server messenger. Before
-// /// either of these happens, we need to configure the indexes.
-// ///
-// private void EnsureUnlockedAndConfigured()
-// {
-// if (_isConfigured) return;
-
-// _isConfigured = true;
-
-// foreach (var luceneIndexer in ExamineManager.Instance.IndexProviderCollection.OfType())
-// {
-// //We now need to disable waiting for indexing for Examine so that the appdomain is shutdown immediately and doesn't wait for pending
-// //indexing operations. We used to wait for indexing operations to complete but this can cause more problems than that is worth because
-// //that could end up halting shutdown for a very long time causing overlapping appdomains and many other problems.
-// luceneIndexer.WaitForIndexQueueOnShutdown = false;
-
-// //we should check if the index is locked ... it shouldn't be! We are using simple fs lock now and we are also ensuring that
-// //the indexes are not operational unless MainDom is true so if _disableExamineIndexing is false then we should be in charge
-// if (_disableExamineIndexing == false)
-// {
-// var dir = luceneIndexer.GetLuceneDirectory();
-// if (IndexWriter.IsLocked(dir))
-// {
-// _profilingLogger.Logger.Info("Forcing index " + luceneIndexer.IndexSetName + " to be unlocked since it was left in a locked state");
-// IndexWriter.Unlock(dir);
-// }
-// }
-// }
-// }
-
-// private void OnInstanceOnBuildingEmptyIndexOnStartup(object sender, BuildingEmptyIndexOnStartupEventArgs args)
-// {
-// //store the indexer that needs rebuilding because it's empty for when the boot process
-// // is complete and cancel this current event so the rebuild process doesn't start right now.
-// args.Cancel = true;
-// _indexesToRebuild.Add((BaseIndexProvider)args.Indexer);
-
-// //check if the index is rebuilding due to an error and log it
-// if (args.IsHealthy == false)
-// {
-// var baseIndex = args.Indexer as BaseIndexProvider;
-// var name = baseIndex != null ? baseIndex.Name : "[UKNOWN]";
-
-// _profilingLogger.Logger.Error(string.Format("The index {0} is rebuilding due to being unreadable/corrupt", name), args.UnhealthyException);
-// }
-// }
-// }
-//}
diff --git a/src/Umbraco.Web/Models/Mapping/EntityMapperProfile.cs b/src/Umbraco.Web/Models/Mapping/EntityMapperProfile.cs
index 5d41c8cb0c..4028d480db 100644
--- a/src/Umbraco.Web/Models/Mapping/EntityMapperProfile.cs
+++ b/src/Umbraco.Web/Models/Mapping/EntityMapperProfile.cs
@@ -136,9 +136,9 @@ namespace Umbraco.Web.Models.Mapping
dest.Key = key;
//need to set the UDI
- if (src.Values.ContainsKey(LuceneIndexer.CategoryFieldName))
+ if (src.Values.ContainsKey(LuceneIndex.CategoryFieldName))
{
- switch (src.Values[LuceneIndexer.CategoryFieldName])
+ switch (src.Values[LuceneIndex.CategoryFieldName])
{
case IndexTypes.Member:
dest.Udi = new GuidUdi(Constants.UdiEntityType.Member, dest.Key);
@@ -168,9 +168,9 @@ namespace Umbraco.Web.Models.Mapping
}
dest.Path = src.Values.ContainsKey(UmbracoExamineIndexer.IndexPathFieldName) ? src.Values[UmbracoExamineIndexer.IndexPathFieldName] : "";
- if (src.Values.ContainsKey(LuceneIndexer.ItemTypeFieldName))
+ if (src.Values.ContainsKey(LuceneIndex.ItemTypeFieldName))
{
- dest.AdditionalData.Add("contentType", src.Values[LuceneIndexer.ItemTypeFieldName]);
+ dest.AdditionalData.Add("contentType", src.Values[LuceneIndex.ItemTypeFieldName]);
}
});
diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/DictionaryPublishedContent.cs b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/DictionaryPublishedContent.cs
index 49e0d1e9d2..7a8ce65ae3 100644
--- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/DictionaryPublishedContent.cs
+++ b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/DictionaryPublishedContent.cs
@@ -57,7 +57,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
ValidateAndSetProperty(valueDictionary, val => _sortOrder = Int32.Parse(val), "sortOrder");
ValidateAndSetProperty(valueDictionary, val => _name = val, "nodeName", "__nodeName");
ValidateAndSetProperty(valueDictionary, val => _urlName = val, "urlName");
- ValidateAndSetProperty(valueDictionary, val => _documentTypeAlias = val, "nodeTypeAlias", LuceneIndexer.ItemTypeFieldName);
+ ValidateAndSetProperty(valueDictionary, val => _documentTypeAlias = val, "nodeTypeAlias", LuceneIndex.ItemTypeFieldName);
ValidateAndSetProperty(valueDictionary, val => _documentTypeId = Int32.Parse(val), "nodeType");
//ValidateAndSetProperty(valueDictionary, val => _writerName = val, "writerName");
ValidateAndSetProperty(valueDictionary, val => _creatorName = val, "creatorName", "writerName"); //this is a bit of a hack fix for: U4-1132
diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMediaCache.cs b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMediaCache.cs
index d334c6ab48..45f32353da 100644
--- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMediaCache.cs
+++ b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMediaCache.cs
@@ -38,7 +38,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
// method GetExamineManagerSafe().
//
private readonly ISearcher _searchProvider;
- private readonly IIndexer _indexProvider;
+ private readonly IIndex _indexProvider;
private readonly XmlStore _xmlStore;
private readonly PublishedContentTypeCache _contentTypeCache;
diff --git a/src/Umbraco.Web/PublishedContentQuery.cs b/src/Umbraco.Web/PublishedContentQuery.cs
index 363607fbcb..8ad40887cc 100644
--- a/src/Umbraco.Web/PublishedContentQuery.cs
+++ b/src/Umbraco.Web/PublishedContentQuery.cs
@@ -234,8 +234,8 @@ namespace Umbraco.Web
if (_query != null) return _query.Search(skip, take, out totalRecords, term, useWildCards, indexName);
var indexer = string.IsNullOrEmpty(indexName)
- ? Examine.ExamineManager.Instance.GetIndexer(Constants.Examine.ExternalIndexer)
- : Examine.ExamineManager.Instance.GetIndexer(indexName);
+ ? Examine.ExamineManager.Instance.GetIndex(Constants.Examine.ExternalIndexer)
+ : Examine.ExamineManager.Instance.GetIndex(indexName);
if (indexer == null) throw new InvalidOperationException("No index found by name " + indexName);
@@ -278,7 +278,7 @@ namespace Umbraco.Web
///
/// Creates an ISearchCriteria for searching all fields in a .
///
- private ISearchCriteria SearchAllFields(string searchText, bool useWildcards, Examine.ISearcher searcher, Examine.IIndexer indexer)
+ private ISearchCriteria SearchAllFields(string searchText, bool useWildcards, Examine.ISearcher searcher, Examine.IIndex indexer)
{
var sc = searcher.CreateCriteria();
diff --git a/src/Umbraco.Web/Search/ExamineComponent.cs b/src/Umbraco.Web/Search/ExamineComponent.cs
index a7c7bf8dae..9c659582ea 100644
--- a/src/Umbraco.Web/Search/ExamineComponent.cs
+++ b/src/Umbraco.Web/Search/ExamineComponent.cs
@@ -113,7 +113,7 @@ namespace Umbraco.Web.Search
//create the indexes and register them with the manager
foreach(var index in indexBuilder.Create())
{
- _examineManager.AddIndexer(index);
+ _examineManager.AddIndex(index);
}
profilingLogger.Logger.Debug("Examine shutdown registered with MainDom");
@@ -192,7 +192,7 @@ namespace Umbraco.Web.Search
_isConfigured = true;
- foreach (var luceneIndexer in examineManager.IndexProviders.Values.OfType())
+ foreach (var luceneIndexer in examineManager.IndexProviders.Values.OfType())
{
//We now need to disable waiting for indexing for Examine so that the appdomain is shutdown immediately and doesn't wait for pending
//indexing operations. We used to wait for indexing operations to complete but this can cause more problems than that is worth because
diff --git a/src/Umbraco.Web/Search/ExamineIndexModel.cs b/src/Umbraco.Web/Search/ExamineIndexModel.cs
index 1851e696f4..aa4c84ce9b 100644
--- a/src/Umbraco.Web/Search/ExamineIndexModel.cs
+++ b/src/Umbraco.Web/Search/ExamineIndexModel.cs
@@ -14,6 +14,9 @@ namespace Umbraco.Web.Search
[DataMember(Name = "healthStatus")]
public string HealthStatus { get; set; }
+ [DataMember(Name = "isHealthy")]
+ public bool IsHealthy => false;
+
[DataMember(Name = "providerProperties")]
public IReadOnlyDictionary ProviderProperties { get; set; }
diff --git a/src/Umbraco.Web/Search/GenericIndexDiagnostics.cs b/src/Umbraco.Web/Search/GenericIndexDiagnostics.cs
index 6d3482837e..32c8d43575 100644
--- a/src/Umbraco.Web/Search/GenericIndexDiagnostics.cs
+++ b/src/Umbraco.Web/Search/GenericIndexDiagnostics.cs
@@ -13,10 +13,10 @@ namespace Umbraco.Web.Search
///
public class GenericIndexDiagnostics : IIndexDiagnostics
{
- private readonly IIndexer _index;
+ private readonly IIndex _index;
private static readonly string[] IgnoreProperties = { "Description" };
- public GenericIndexDiagnostics(IIndexer index)
+ public GenericIndexDiagnostics(IIndex index)
{
_index = index;
}
diff --git a/src/Umbraco.Web/Search/IUmbracoIndexesBuilder.cs b/src/Umbraco.Web/Search/IUmbracoIndexesBuilder.cs
index 8193117d69..ec8d923abc 100644
--- a/src/Umbraco.Web/Search/IUmbracoIndexesBuilder.cs
+++ b/src/Umbraco.Web/Search/IUmbracoIndexesBuilder.cs
@@ -5,6 +5,6 @@ namespace Umbraco.Web.Search
{
internal interface IUmbracoIndexesBuilder
{
- IEnumerable Create();
+ IEnumerable Create();
}
}
diff --git a/src/Umbraco.Web/Search/UmbracoIndexesBuilder.cs b/src/Umbraco.Web/Search/UmbracoIndexesBuilder.cs
index fbe4d618e6..18ea85162c 100644
--- a/src/Umbraco.Web/Search/UmbracoIndexesBuilder.cs
+++ b/src/Umbraco.Web/Search/UmbracoIndexesBuilder.cs
@@ -45,7 +45,7 @@ namespace Umbraco.Web.Search
/// Creates the Umbraco indexes
///
///
- public IEnumerable Create()
+ public IEnumerable Create()
{
return new []
{
@@ -55,7 +55,7 @@ namespace Umbraco.Web.Search
};
}
- private IIndexer CreateInternalIndex()
+ private IIndex CreateInternalIndex()
{
var index = new UmbracoContentIndexer(
Constants.UmbracoIndexes.InternalIndexName,
@@ -69,7 +69,7 @@ namespace Umbraco.Web.Search
return index;
}
- private IIndexer CreateExternalIndex()
+ private IIndex CreateExternalIndex()
{
var index = new UmbracoContentIndexer(
Constants.UmbracoIndexes.ExternalIndexName,
@@ -83,7 +83,7 @@ namespace Umbraco.Web.Search
return index;
}
- private IIndexer CreateMemberIndex()
+ private IIndex CreateMemberIndex()
{
var index = new UmbracoMemberIndexer(
Constants.UmbracoIndexes.MembersIndexName,
diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj
index 3e54107759..90d9a58ef8 100755
--- a/src/Umbraco.Web/Umbraco.Web.csproj
+++ b/src/Umbraco.Web/Umbraco.Web.csproj
@@ -62,7 +62,7 @@
-
+
2.6.2.25
@@ -219,7 +219,6 @@
-