NAME
Typesense::Client::Collections - collection management
SYNOPSIS
my $c = $ts->collections;
$c->create({
name => 'products',
fields => [ { name => 'name', type => 'string' } ],
});
my $all = $c->list;
my $one = $c->get('products');
$c->update('products', { fields => [ { name => 'stock', type => 'int32' } ] });
$c->drop('products');
METHODS
list
GET /collections. Every collection on the server.
create
POST /collections. Takes the schema as a hash reference.
get
GET /collections/{name}. Includes num_documents, which is what you check after a bulk import.
update
PATCH /collections/{name}. Typesense only allows adding and dropping fields here; the rest of the schema is immutable. Changing a field's type means indexing into a new collection and moving an alias - see Typesense::Client::Aliases.
drop
DELETE /collections/{name}. A collection that is already gone is not an error: the call returns undef rather than throwing.
SEE ALSO
AUTHOR
SeHarrys
COPYRIGHT AND LICENSE
This software is copyright (c) 2026 by SeHarrys.
This is free software; you can redistribute it and/or modify it under the terms of the Artistic License 2.0.