Search Results for

    Show / Hide Table of Contents
    View Source

    Class ContentIndexPopulator

    Performs the data lookups required to rebuild a content index

    Inheritance
    object
    IndexPopulator
    IndexPopulator<IUmbracoContentIndex>
    Namespace: Umbraco.Cms.Infrastructure.Examine
    Assembly: Umbraco.Infrastructure.dll
    Syntax
    public class ContentIndexPopulator : IndexPopulator<IUmbracoContentIndex>, IIndexPopulator

    Constructors

    View Source

    ContentIndexPopulator(ILogger<ContentIndexPopulator>, bool, int?, IContentService, IUmbracoDatabaseFactory, IValueSetBuilder<IContent>)

    Initializes a new instance of the ContentIndexPopulator class.

    Declaration
    [Obsolete("Please use the non-obsolete constructor. Scheduled for removal in Umbraco 19.")]
    public ContentIndexPopulator(ILogger<ContentIndexPopulator> logger, bool publishedValuesOnly, int? parentId, IContentService contentService, IUmbracoDatabaseFactory umbracoDatabaseFactory, IValueSetBuilder<IContent> contentValueSetBuilder)
    Parameters
    Type Name Description
    ILogger<ContentIndexPopulator> logger

    The logger used for diagnostic and operational messages.

    bool publishedValuesOnly

    If set to true, only published content values are indexed.

    int? parentId

    An optional parent content ID to restrict indexing to its descendants, or null for all content.

    IContentService contentService

    Service for accessing and managing content items.

    IUmbracoDatabaseFactory umbracoDatabaseFactory

    Factory for obtaining Umbraco database connections.

    IValueSetBuilder<IContent> contentValueSetBuilder

    Builds value sets for content items to be indexed.

    View Source

    ContentIndexPopulator(ILogger<ContentIndexPopulator>, bool, int?, IContentService, IUmbracoDatabaseFactory, IValueSetBuilder<IContent>, IOptionsMonitor<IndexingSettings>)

    Initializes a new instance of the ContentIndexPopulator class with custom query parameters.

    Declaration
    public ContentIndexPopulator(ILogger<ContentIndexPopulator> logger, bool publishedValuesOnly, int? parentId, IContentService contentService, IUmbracoDatabaseFactory umbracoDatabaseFactory, IValueSetBuilder<IContent> contentValueSetBuilder, IOptionsMonitor<IndexingSettings> indexingSettings)
    Parameters
    Type Name Description
    ILogger<ContentIndexPopulator> logger

    The logger used for diagnostic and error messages.

    bool publishedValuesOnly

    If true, only published content values are indexed.

    int? parentId

    An optional parent content ID to restrict indexing to a subtree.

    IContentService contentService

    The service used to access content items.

    IUmbracoDatabaseFactory umbracoDatabaseFactory

    The factory for obtaining Umbraco database connections.

    IValueSetBuilder<IContent> contentValueSetBuilder

    Builds value sets for content items to be indexed.

    IOptionsMonitor<IndexingSettings> indexingSettings

    Monitors configuration settings for indexing.

    View Source

    ContentIndexPopulator(ILogger<ContentIndexPopulator>, IContentService, IUmbracoDatabaseFactory, IContentValueSetBuilder)

    Initializes a new instance of the ContentIndexPopulator class, which is responsible for populating the content index in Examine.

    Declaration
    [Obsolete("Please use the non-obsolete constructor. Scheduled for removal in Umbraco 19.")]
    public ContentIndexPopulator(ILogger<ContentIndexPopulator> logger, IContentService contentService, IUmbracoDatabaseFactory umbracoDatabaseFactory, IContentValueSetBuilder contentValueSetBuilder)
    Parameters
    Type Name Description
    ILogger<ContentIndexPopulator> logger

    The logger used for logging diagnostic and error information.

    IContentService contentService

    The service used to access and manage Umbraco content items.

    IUmbracoDatabaseFactory umbracoDatabaseFactory

    The factory for creating Umbraco database connections.

    IContentValueSetBuilder contentValueSetBuilder

    The builder used to create value sets for content indexing.

    View Source

    ContentIndexPopulator(ILogger<ContentIndexPopulator>, IContentService, IUmbracoDatabaseFactory, IContentValueSetBuilder, IOptionsMonitor<IndexingSettings>)

    Initializes a new instance of the ContentIndexPopulator class, used to populate the content index with all content data.

    Declaration
    public ContentIndexPopulator(ILogger<ContentIndexPopulator> logger, IContentService contentService, IUmbracoDatabaseFactory umbracoDatabaseFactory, IContentValueSetBuilder contentValueSetBuilder, IOptionsMonitor<IndexingSettings> indexingSettings)
    Parameters
    Type Name Description
    ILogger<ContentIndexPopulator> logger

    The logger instance used for diagnostic and error logging.

    IContentService contentService

    The service used to access and manage content items.

    IUmbracoDatabaseFactory umbracoDatabaseFactory

    The factory for creating Umbraco database connections.

    IContentValueSetBuilder contentValueSetBuilder

    Builds value sets for content items to be indexed.

    IOptionsMonitor<IndexingSettings> indexingSettings

    The monitor providing indexing configuration settings.

    Methods

    View Source

    IndexAllContent(int, int, int, IReadOnlyList<IIndex>)

    Declaration
    protected void IndexAllContent(int contentParentId, int pageIndex, int pageSize, IReadOnlyList<IIndex> indexes)
    Parameters
    Type Name Description
    int contentParentId
    int pageIndex
    int pageSize
    IReadOnlyList<IIndex> indexes
    View Source

    IndexPublishedContent(int, int, int, IReadOnlyList<IIndex>)

    Declaration
    protected void IndexPublishedContent(int contentParentId, int pageIndex, int pageSize, IReadOnlyList<IIndex> indexes)
    Parameters
    Type Name Description
    int contentParentId
    int pageIndex
    int pageSize
    IReadOnlyList<IIndex> indexes
    View Source

    IsRegistered(IUmbracoContentIndex)

    Determines whether the specified content index is registered for population.

    Declaration
    public override bool IsRegistered(IUmbracoContentIndex index)
    Parameters
    Type Name Description
    IUmbracoContentIndex index

    The content index to check.

    Returns
    Type Description
    bool

    true if the content index is registered; otherwise, false.

    View Source

    PopulateIndexes(IReadOnlyList<IIndex>)

    Declaration
    protected override void PopulateIndexes(IReadOnlyList<IIndex> indexes)
    Parameters
    Type Name Description
    IReadOnlyList<IIndex> indexes
    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX