Search::Typesense::Document - CRUD for Typesense documents
version 0.08
my $typesense = Search::Typesense->new( host => $host, api_key => $key, ); my $documents = $typesense->documents;
The instantiation of this module is for internal use only. The methods are public.
create
my $document = $typesense->documents->create($collection, \%data);
Arguments and response as shown at https://typesense.org/docs/0.19.0/api/#index-document
upsert
my $document = $typesense->documents->upsert($collection, \%data);
Arguments and response as shown at https://typesense.org/docs/0.19.0/api/#upsert
update
my $document = $typesense->documents->update($collection, $document_id, \%data);
Arguments and response as shown at https://typesense.org/docs/0.19.0/api/#update-document
delete
my $document = $typesense->documents->delete($collection_name, $document_id);
Arguments and response as shown at https://typesense.org/docs/0.19.0/api/#delete-document
export
my $export = $typesense->documents->export($collection_name);
Response as shown at https://typesense.org/docs/0.19.0/api/#export-documents
(An arrayref of hashrefs)
import
my $response = $typesense->documents->import( $collection_name, $action, \@documents, );
Response as shown at https://typesense.org/docs/0.19.0/api/#import-documents
$action must be one of create, update, or upsert.
$action
Curtis "Ovid" Poe <ovid@allaroundtheworld.fr>
This software is copyright (c) 2021 by Curtis "Ovid" Poe.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Search::Typesense, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Search::Typesense
CPAN shell
perl -MCPAN -e shell install Search::Typesense
For more information on module installation, please visit the detailed CPAN module installation guide.