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