You are currently browsing legacy 4.1 version of documentation. Click here to switch to the newest 4.2 version.

We can help you with migration to the latest RavenDB

Contact Us Now
see on GitHub

Operations: How to Get Index Errors

GetIndexErrorsOperation is used to return errors encountered during document indexing.

Syntax

public GetIndexErrorsOperation()

public GetIndexErrorsOperation(string[] indexNames)

public class IndexErrors
{
    public string Name { get; set; }
    public IndexingError[] Errors { get; set; }
}

public class IndexingError
{
    public string Error { get; set; }
    public DateTime Timestamp { get; set; }
    public string Document { get; set; }
    public string Action { get; set; }
}

Return Value
Name string Index name
Errors IndexingError[] List of indexing errors

Example I

// gets errors for all indexes
IndexErrors[] indexErrors = store.Maintenance.Send(new GetIndexErrorsOperation());

Example II

// gets errors only for 'Orders/Totals' index
IndexErrors[] indexErrors = store.Maintenance.Send(new GetIndexErrorsOperation(new[] { "Orders/Totals" }));