Search Results for

    Show / Hide Table of Contents
    View Source

    Class UmbracoExamineIndex

    An abstract provider containing the basic functionality to be able to query against Umbraco data.

    Inheritance
    object
    BaseIndexProvider
    LuceneIndex
    Namespace: Umbraco.Cms.Infrastructure.Examine
    Assembly: Umbraco.Examine.Lucene.dll
    Syntax
    public abstract class UmbracoExamineIndex : LuceneIndex, IUmbracoIndex, IIndexDiagnostics

    Constructors

    View Source

    UmbracoExamineIndex(ILoggerFactory, string, IOptionsMonitor<LuceneDirectoryIndexOptions>, IHostingEnvironment, IRuntimeState)

    Declaration
    protected UmbracoExamineIndex(ILoggerFactory loggerFactory, string name, IOptionsMonitor<LuceneDirectoryIndexOptions> indexOptions, IHostingEnvironment hostingEnvironment, IRuntimeState runtimeState)
    Parameters
    Type Name Description
    ILoggerFactory loggerFactory
    string name
    IOptionsMonitor<LuceneDirectoryIndexOptions> indexOptions
    IHostingEnvironment hostingEnvironment
    IRuntimeState runtimeState

    Properties

    View Source

    ApplySpecialValueTransformations

    Performs special __Path and __Icon value transformations to all deriving indexes when set to true.

    Declaration
    protected virtual bool ApplySpecialValueTransformations { get; }
    Property Value
    Type Description
    bool
    View Source

    EnableDefaultEventHandler

    When set to true Umbraco will keep the index in sync with Umbraco data automatically

    Declaration
    public bool EnableDefaultEventHandler { get; set; }
    Property Value
    Type Description
    bool
    View Source

    Metadata

    A key/value collection of diagnostic properties for the index

    Declaration
    public virtual IReadOnlyDictionary<string, object?> Metadata { get; }
    Property Value
    Type Description
    IReadOnlyDictionary<string, object>
    Remarks

    Used to display in the UI

    View Source

    PublishedValuesOnly

    When set to true the index will only retain published values

    Declaration
    public bool PublishedValuesOnly { get; protected set; }
    Property Value
    Type Description
    bool
    Remarks

    Any non-published values will not be put or kept in the index:

    • Deleted, Trashed, non-published Content items
    • non-published Variants
    View Source

    SupportProtectedContent

    Whether the index can contain protected content

    Declaration
    public bool SupportProtectedContent { get; protected set; }
    Property Value
    Type Description
    bool
    Remarks

    To retain backwards compatability, the default value is true

    Methods

    View Source

    CanInitialize()

    Returns true if the Umbraco application is in a state that we can initialize the examine indexes

    Declaration
    protected bool CanInitialize()
    Returns
    Type Description
    bool
    View Source

    IsHealthy()

    If the index can be open/read

    Declaration
    public Attempt<string?> IsHealthy()
    Returns
    Type Description
    Attempt<string>

    A successful attempt if it is healthy, else a failed attempt with a message if unhealthy

    View Source

    OnDocumentWriting(DocumentWritingEventArgs)

    This ensures that the special _Raw fields are indexed correctly

    Declaration
    protected override void OnDocumentWriting(DocumentWritingEventArgs docArgs)
    Parameters
    Type Name Description
    DocumentWritingEventArgs docArgs
    View Source

    OnTransformingIndexValues(IndexingItemEventArgs)

    Declaration
    protected override void OnTransformingIndexValues(IndexingItemEventArgs e)
    Parameters
    Type Name Description
    IndexingItemEventArgs e
    View Source

    PerformDeleteFromIndex(IEnumerable<string>, Action<IndexOperationEventArgs>?)

    override to check if we can actually initialize.

    Declaration
    protected override void PerformDeleteFromIndex(IEnumerable<string> itemIds, Action<IndexOperationEventArgs>? onComplete)
    Parameters
    Type Name Description
    IEnumerable<string> itemIds
    Action<IndexOperationEventArgs> onComplete
    Remarks

    This check is required since the base examine lib will try to rebuild on startup

    View Source

    PerformIndexItems(IEnumerable<ValueSet>, Action<IndexOperationEventArgs>)

    Declaration
    protected override void PerformIndexItems(IEnumerable<ValueSet> values, Action<IndexOperationEventArgs> onComplete)
    Parameters
    Type Name Description
    IEnumerable<ValueSet> values
    Action<IndexOperationEventArgs> onComplete
    • Edit this page
    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX