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" }));