Search Results for

    Show / Hide Table of Contents
    View Source

    Class GenericIndexDiagnostics

    Used to return diagnostic data for any index

    Inheritance
    object
    Namespace: Umbraco.Cms.Infrastructure.Examine
    Assembly: Umbraco.Infrastructure.dll
    Syntax
    public class GenericIndexDiagnostics : IIndexDiagnostics, IIndexStats

    Constructors

    View Source

    GenericIndexDiagnostics(IIndex)

    Initializes a new instance of the GenericIndexDiagnostics class with the specified index.

    Declaration
    public GenericIndexDiagnostics(IIndex index)
    Parameters
    Type Name Description
    IIndex index

    The index to run diagnostics against.

    Properties

    View Source

    DocumentCount

    Gets the count of documents in the index.

    Declaration
    public int DocumentCount { get; }
    Property Value
    Type Description
    int
    Remarks

    unknown

    View Source

    FieldCount

    Gets the count of fields in the generic index. Returns -1 if unknown.

    Declaration
    public int FieldCount { get; }
    Property Value
    Type Description
    int
    Remarks

    unknown

    View Source

    Metadata

    Gets a read-only dictionary containing metadata extracted from the index instance. The metadata consists of property names and their corresponding values, where the properties are those of the underlying index type, excluding any ignored properties. This metadata provides insight into the configuration and state of the index instance.

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

    Methods

    View Source

    GetDocumentCount()

    Gets the count of documents in the index.

    Declaration
    public long GetDocumentCount()
    Returns
    Type Description
    long

    The number of documents in the index, or -1 if unavailable.

    View Source

    GetFieldNames()

    Returns an enumerable collection of field names associated with the index.

    Declaration
    public IEnumerable<string> GetFieldNames()
    Returns
    Type Description
    IEnumerable<string>

    An System.Collections.Generic.IEnumerable<T> of field names. Currently, this implementation returns an empty collection.

    View Source

    IsHealthy()

    Determines whether the index is healthy by checking for its existence and verifying that a basic search query can be executed successfully.

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

    An Attempt<string?> that succeeds if the index is healthy, or fails with an error message if not.

    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX