Skip ExamineLuceneComposer if not on windows and reintroduce ExamineComposer

This commit is contained in:
Bjarke Berg
2020-08-26 12:01:01 +02:00
parent f286fdd855
commit ba129fa927
2 changed files with 7 additions and 10 deletions

View File

@@ -1,4 +1,5 @@
using Umbraco.Core;
using System.Runtime.InteropServices;
using Umbraco.Core;
using Umbraco.Core.Composing;
namespace Umbraco.Examine
@@ -10,6 +11,10 @@ namespace Umbraco.Examine
{
public override void Compose(Composition composition)
{
var isWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
if(!isWindows) return;
base.Compose(composition);
composition.RegisterUnique<IBackOfficeExamineSearcher, BackOfficeExamineSearcher>();

View File

@@ -1,7 +1,4 @@
using System.Collections.Generic;
using System.Runtime.InteropServices;
using Examine;
using Umbraco.Core;
using Umbraco.Core;
using Umbraco.Core.Composing;
using Umbraco.Core.Models;
using Umbraco.Core.PropertyEditors;
@@ -21,13 +18,8 @@ namespace Umbraco.Web.Search
{
public override void Compose(Composition composition)
{
var isWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
if(!isWindows) return;
base.Compose(composition);
// populators are not a collection: one cannot remove ours, and can only add more
// the container can inject IEnumerable<IIndexPopulator> and get them all
composition.Register<MemberIndexPopulator>(Lifetime.Singleton);