Get Index Errors Operation
GetIndexErrorsOperation is used to return errors encountered during document indexing.
Syntax
public GetIndexErrorsOperation()
public GetIndexErrorsOperation(String[] indexNames)
public class IndexErrors {
private String name;
private IndexingError[] errors;
public IndexErrors() {
errors = new IndexingError[0];
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public IndexingError[] getErrors() {
return errors;
}
public void setErrors(IndexingError[] errors) {
this.errors = errors;
}
}
public class IndexingError {
private String error;
private Date timestamp;
private String document;
private String action;
public String getError() {
return error;
}
public void setError(String error) {
this.error = error;
}
public Date getTimestamp() {
return timestamp;
}
public void setTimestamp(Date timestamp) {
this.timestamp = timestamp;
}
public String getDocument() {
return document;
}
public void setDocument(String document) {
this.document = document;
}
public String getAction() {
return action;
}
public void setAction(String action) {
this.action = action;
}
}
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 String[]{"Orders/Totals"}));