Skip to content

Conversation

@erimicel
Copy link
Contributor

@erimicel erimicel commented Feb 24, 2025

Change Summary

The truncate option mentioned in the Typesense docs could be integrated directly into the gem as a shortcut.

Example:

###
# Truncate a collection
#   Deletion returns the number of documents deleted
collection = @typesense.collections['companies'].truncate
ap collection

# {
#   "num_deleted": 125
# }

PR Checklist

@jasonbosco
Copy link
Member

Thank you for the PR!

@jasonbosco jasonbosco merged commit cdf31c2 into typesense:master Feb 24, 2025
3 checks passed
@jasonbosco
Copy link
Member

Available in 3.0.1

@erimicel erimicel deleted the add_truncate_collection_documents branch April 28, 2025 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants