WeaviateEx.Batch.DeleteResult (WeaviateEx v0.7.4)
View SourceTyped result for batch delete operations.
Contains information about the delete operation including matches, successes, failures, and optionally the deleted objects.
Examples
# Parse a delete response
{:ok, result} = DeleteResult.from_api(response)
# Check statistics
result.matches # Total objects matching filter
result.successful # Successfully deleted count
result.failed # Failed deletion count
# Access deleted objects (if verbose output requested)
Enum.each(result.objects, fn obj ->
IO.puts("Deleted: #{obj.uuid}")
end)
Summary
Functions
Check if all matched objects were successfully deleted.
Get objects that failed to delete.
Parse a delete result from the Weaviate API response.
Check if any deletions failed.
Get objects that were successfully deleted.
Get a summary of the delete operation.
Types
@type t() :: %WeaviateEx.Batch.DeleteResult{ dry_run: boolean(), failed: non_neg_integer(), limit: non_neg_integer(), matches: non_neg_integer(), objects: [WeaviateEx.Batch.DeleteResult.DeletedObject.t()], successful: non_neg_integer() }
Functions
Check if all matched objects were successfully deleted.
@spec failed_objects(t()) :: [WeaviateEx.Batch.DeleteResult.DeletedObject.t()]
Get objects that failed to delete.
Parse a delete result from the Weaviate API response.
Examples
response = %{
"match" => %{"matches" => 10, "limit" => 10000},
"output" => "verbose",
"results" => %{
"successful" => 10,
"failed" => 0,
"objects" => [%{"id" => "uuid-1", "status" => "SUCCESS"}]
}
}
{:ok, result} = DeleteResult.from_api(response)
Check if any deletions failed.
@spec successful_objects(t()) :: [WeaviateEx.Batch.DeleteResult.DeletedObject.t()]
Get objects that were successfully deleted.
Get a summary of the delete operation.