Skip to content

Add truncate collection documents#40

Merged
jasonbosco merged 1 commit intotypesense:masterfrom
OLIOEX:add_truncate_collection_documents
Feb 24, 2025
Merged

Add truncate collection documents#40
jasonbosco merged 1 commit intotypesense:masterfrom
OLIOEX:add_truncate_collection_documents

Conversation

@erimicel
Copy link
Copy Markdown
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
Copy Markdown
Member

Thank you for the PR!

@jasonbosco jasonbosco merged commit cdf31c2 into typesense:master Feb 24, 2025
@jasonbosco
Copy link
Copy Markdown
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