++ed by:
SMONFF
Author image Curtis "Ovid" Poe
and 1 contributors

NAME

Search::Typesense::Document - CRUD for Typesense documents

VERSION

version 0.08

SYNOPSIS

    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.

AUTHOR

Curtis "Ovid" Poe <ovid@allaroundtheworld.fr>

COPYRIGHT AND LICENSE

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.