IndexingResult Class

  • java.lang.Object
    • com.azure.search.documents.models.IndexingResult

Implements

public final class IndexingResult
implements JsonSerializable<IndexingResult>, Serializable

Status of an indexing operation for a single document.

Constructor Summary

Constructor Description
IndexingResult(String key, boolean succeeded, int statusCode)

Creates an instance of IndexingResult class.

Method Summary

Modifier and Type Method and Description
static IndexingResult fromJson(JsonReader jsonReader)

Reads an instance of IndexingResult from the JsonReader.

String getErrorMessage()

Get the errorMessage property: The error message explaining why the indexing operation failed for the document identified by the key; null if indexing succeeded.

String getKey()

Get the key property: The key of a document that was in the indexing request.

int getStatusCode()

Get the statusCode property: The status code of the indexing operation.

boolean isSucceeded()

Get the succeeded property: A value indicating whether the indexing operation succeeded for the document identified by the key.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

IndexingResult

public IndexingResult(String key, boolean succeeded, int statusCode)

Creates an instance of IndexingResult class.

Parameters:

key - the key value to set.
succeeded - the succeeded value to set.
statusCode - the statusCode value to set.

Method Details

fromJson

public static IndexingResult fromJson(JsonReader jsonReader)

Reads an instance of IndexingResult from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of IndexingResult if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

getErrorMessage

public String getErrorMessage()

Get the errorMessage property: The error message explaining why the indexing operation failed for the document identified by the key; null if indexing succeeded.

Returns:

the errorMessage value.

getKey

public String getKey()

Get the key property: The key of a document that was in the indexing request.

Returns:

the key value.

getStatusCode

public int getStatusCode()

Get the statusCode property: The status code of the indexing operation. Possible values include: 200 for a successful update or delete, 201 for successful document creation, 400 for a malformed input document, 404 for document not found, 409 for a version conflict, 422 when the index is temporarily unavailable, or 503 for when the service is too busy.

Returns:

the statusCode value.

isSucceeded

public boolean isSucceeded()

Get the succeeded property: A value indicating whether the indexing operation succeeded for the document identified by the key.

Returns:

the succeeded value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to