Create Interface for Member and Content Index to use in Populators
This commit is contained in:
@@ -15,7 +15,7 @@ namespace Umbraco.Examine
|
||||
/// <summary>
|
||||
/// Performs the data lookups required to rebuild a content index
|
||||
/// </summary>
|
||||
public class ContentIndexPopulator : IndexPopulator<UmbracoContentIndex>
|
||||
public class ContentIndexPopulator : IndexPopulator<IUmbracoContentIndex>
|
||||
{
|
||||
private readonly IContentService _contentService;
|
||||
private readonly IValueSetBuilder<IContent> _contentValueSetBuilder;
|
||||
@@ -36,7 +36,7 @@ namespace Umbraco.Examine
|
||||
/// <param name="contentValueSetBuilder"></param>
|
||||
public ContentIndexPopulator(IContentService contentService, ISqlContext sqlContext, IContentValueSetBuilder contentValueSetBuilder)
|
||||
: this(false, null, contentService, sqlContext, contentValueSetBuilder)
|
||||
{
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
9
src/Umbraco.Examine/IUmbracoContentIndex.cs
Normal file
9
src/Umbraco.Examine/IUmbracoContentIndex.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using Examine;
|
||||
|
||||
namespace Umbraco.Examine
|
||||
{
|
||||
public interface IUmbracoContentIndex : IIndex
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
9
src/Umbraco.Examine/IUmbracoMemberIndex.cs
Normal file
9
src/Umbraco.Examine/IUmbracoMemberIndex.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using Examine;
|
||||
|
||||
namespace Umbraco.Examine
|
||||
{
|
||||
public interface IUmbracoMemberIndex : IIndex
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,7 @@ using Umbraco.Core.Services;
|
||||
|
||||
namespace Umbraco.Examine
|
||||
{
|
||||
public class MemberIndexPopulator : IndexPopulator<UmbracoMemberIndex>
|
||||
public class MemberIndexPopulator : IndexPopulator<IUmbracoMemberIndex>
|
||||
{
|
||||
private readonly IMemberService _memberService;
|
||||
private readonly IValueSetBuilder<IMember> _valueSetBuilder;
|
||||
|
||||
@@ -64,10 +64,12 @@
|
||||
<Compile Include="ExamineExtensions.cs" />
|
||||
<Compile Include="IContentValueSetBuilder.cs" />
|
||||
<Compile Include="IContentValueSetValidator.cs" />
|
||||
<Compile Include="IUmbracoContentIndex.cs" />
|
||||
<Compile Include="IUmbracoIndexConfig.cs" />
|
||||
<Compile Include="IIndexCreator.cs" />
|
||||
<Compile Include="IIndexDiagnostics.cs" />
|
||||
<Compile Include="IIndexPopulator.cs" />
|
||||
<Compile Include="IUmbracoMemberIndex.cs" />
|
||||
<Compile Include="UmbracoIndexConfig.cs" />
|
||||
<Compile Include="IndexPopulator.cs" />
|
||||
<Compile Include="IndexRebuilder.cs" />
|
||||
|
||||
@@ -17,13 +17,13 @@ namespace Umbraco.Examine
|
||||
/// <summary>
|
||||
/// An indexer for Umbraco content and media
|
||||
/// </summary>
|
||||
public class UmbracoContentIndex : UmbracoExamineIndex
|
||||
public class UmbracoContentIndex : UmbracoExamineIndex, IUmbracoContentIndex
|
||||
{
|
||||
public const string VariesByCultureFieldName = SpecialFieldPrefix + "VariesByCulture";
|
||||
protected ILocalizationService LanguageService { get; }
|
||||
|
||||
#region Constructors
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Create an index at runtime
|
||||
/// </summary>
|
||||
@@ -141,6 +141,6 @@ namespace Umbraco.Examine
|
||||
|
||||
base.PerformDeleteFromIndex(idsAsList, onComplete);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace Umbraco.Examine
|
||||
/// <summary>
|
||||
/// Custom indexer for members
|
||||
/// </summary>
|
||||
public class UmbracoMemberIndex : UmbracoExamineIndex
|
||||
public class UmbracoMemberIndex : UmbracoExamineIndex, IUmbracoMemberIndex
|
||||
{
|
||||
/// <summary>
|
||||
/// Constructor to allow for creating an indexer at runtime
|
||||
@@ -32,6 +32,6 @@ namespace Umbraco.Examine
|
||||
base(name, luceneDirectory, fieldDefinitions, analyzer, profilingLogger, validator)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user