NAME

Data::AnyXfer::Elastic::Index - Elasticsearch Index Object

DESCRIPTION

This module is intended to act as a instance of a index. It wraps the most common
methods for index CRUD and search operations. Each of these methods have the
index name and document type injected into them, thus a instance of this object
can only connect to a particular index. Any methods required that are not currently
wrapped should be added when required.

SYNOSPSIS

my $index = Data::AnyXfer::Elastic::Index->new(
    index_name  => 'properties',     # required
    index_type  => 'property'        # required
);

ATTRIBUTES

index_name

Sets the name of the elasticsearch index - on test environments this is
prepeneded with executing hostname.

index_type

Sets the type of document.

is_inject_index_and_type

This overrides the attribute in Data::AnyXfer::Elastic. It forces any method called to be injected with the index name and type - fetched from the attributes index_name and index_type.

METHODS

Methods are imported from:

See: L<Search::Elasticsearch::Client::Direct>

IMPLEMENTS METHODS

suggest

$index->suggest( body => {} );

This method was removed in later versions of Elasticsearch, so we provide a replacement for compatibility.

COPYRIGHT

This software is copyright (c) 2019, Anthony Lucas.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.