GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Search::Elasticsearch::Client::0_90::Direct::Indices(3) User Contributed Perl Documentation Search::Elasticsearch::Client::0_90::Direct::Indices(3)

Search::Elasticsearch::Client::0_90::Direct::Indices - A client for running index-level requests

version 5.02

This module provides methods to make index-level requests, such as creating and deleting indices, managing type mappings, index settings, warmers, index templates and aliases.

It does Search::Elasticsearch::Role::Client::Direct.

    $result = $e->indices->create(
        index => 'my_index'             # required

        body  => {                      # optional
            index settings
            mappings
            warmers
        }
    );

The "create()" method is used to create an index. Optionally, index settings, type mappings and index warmers can be added at the same time.

Query string parameters: "master_timeout", "timeout"

See the create index docs <http://www.elastic.co/guide/en/elasticsearch/reference/0.90/indices-create-index.html> for more information.

    $bool = $e->indices->exists(
        index => 'index' | \@indices    # required
    );

The "exists()" method returns 1 or the empty string to indicate whether the specified index or indices exist.

See the index exists docs <http://www.elastic.co/guide/en/elasticsearch/reference/0.90/indices-indices-exists.html> for more information.

    $response = $e->indices->delete(
        index => 'index' | \@indices    # required
    );

The "delete()" method deletes the specified indices.

Query string parameters: "master_timeout", "timeout"

See the delete index docs <http://www.elastic.co/guide/en/elasticsearch/reference/0.90/indices-delete-index.html> for more information.

    $response = $e->indices->close(
        index => 'index' | \@indices    # required
    );

The "close()" method closes the specified indices, reducing resource usage but allowing them to be reopened later.

Query string parameters: "master_timeout", "timeout"

See the close index docs <http://www.elastic.co/guide/en/elasticsearch/reference/0.90/indices-open-close.html> for more information.

    $response = $e->indices->open(
        index => 'index' | \@indices    # optional
    );

The "open()" method opens closed indices.

Query string parameters: "master_timeout", "timeout"

See the open index docs <http://www.elastic.co/guide/en/elasticsearch/reference/0.90/indices-open-close.html> for more information.

    $response = $e->indices->clear_cache(
        index => 'index' | \@indices        # optional
    );

The "clear_cache()" method is used to clear the in-memory filter, fielddata, or id cache for the specified indices.

Query string parameters: "allow_no_indices", "expand_wildcards", "fielddata", "fields", "filter", "filter_cache", "filter_keys", "id", "ignore_indices", "ignore_unavailable", "index", "recycler"

See the clear_cache docs <http://www.elastic.co/guide/en/elasticsearch/reference/0.90/indices-clearcache.html> for more information.

    $response = $e->indices->refresh(
        index => 'index' | \@indices    # optional
    );

The "refresh()" method refreshes the specified indices (or all indices), allowing recent changes to become visible to search. This process normally happens automatically once every second by default.

Query string parameters: "allow_no_indices", "expand_wildcards", "ignore_indices", "ignore_unavailable"

See the refresh index docs <http://www.elastic.co/guide/en/elasticsearch/reference/0.90/indices-refresh.html> for more information.

    $response = $e->indices->flush(
        index => 'index' | \@indices    # optional
    );

The "flush()" method causes the specified indices (or all indices) to be written to disk with an "fsync", and clears out the transaction log. This process normally happens automatically.

Query string parameters: "allow_no_indices", "expand_wildcards", "force", "full", "ignore_indices", "ignore_unavailable", "refresh"

See the flush index docs <http://www.elastic.co/guide/en/elasticsearch/reference/0.90/indices-flush.html> for more information.

    $response = $e->indices->optimize(
        index => 'index' | \@indices    # optional
    );

The "optimize()" method rewrites all the data in an index into at most "max_num_segments". This is a very heavy operation and should only be run with care, and only on indices that are no longer being updated.

Query string parameters: "allow_no_indices", "expand_wildcards", "flush", "ignore_indices", "ignore_unavailable", "max_num_segments", "only_expunge_deletes", "refresh", "wait_for_merge"

See the optimize index docs <http://www.elastic.co/guide/en/elasticsearch/reference/0.90/indices-optimize.html> for more information.

    $response = $e->indices->snapshot_index(
        index => 'index' | \@indices    # optional
    );

Deprecated.

See the snapshot_index docs <http://www.elastic.co/guide/en/elasticsearch/reference/0.90/> for more information.

    $response = $e->indices->put_mapping(
        index => 'index' | \@indices    # optional,
        type  => 'type',                # required

        body  => { mapping }            # required
    )

The "put_mapping()" method is used to create or update a type mapping on an existing index. Mapping updates are allowed to add new fields, but not to overwrite or change existing fields.

For instance:

    $response = $e->indices->put_mapping(
        index   => 'users',
        type    => 'user',
        body    => {
            user => {
                properties => {
                    name => { type => 'string'  },
                    age  => { type => 'integer' }
                }
            }
        }
    );

Query string parameters: "ignore_conflicts", "master_timeout", "timeout"

See the put_mapping docs <http://www.elastic.co/guide/en/elasticsearch/reference/0.90/indices-put-mapping.html> for more information.

    $result = $e->indices->get_mapping(
        index => 'index' | \@indices    # optional,
        type  => 'type'  | \@types      # optional
    );

The "get_mapping()" method returns the type definitions for one, more or all types in one, more or all indices.

See the get_mapping docs <http://www.elastic.co/guide/en/elasticsearch/reference/0.90/indices-get-mapping.html> for more information.

    $result = $e->indices->get_field_mapping(
        index => 'index' | \@indices    # optional,
        type  => 'type'  | \@types      # optional,
        field => 'field' | \@fields     # required

        include_defaults => 0 | 1
    );

The "get_field_mapping()" method returns the field definitions for one, more or all fields in one, more or all types and indices.

See the get_mapping docs <http://www.elastic.co/guide/en/elasticsearch/reference/0.90/indices-get-field-mapping.html> for more information.

    $bool = $e->indices->exists_type(
        index => 'index' | \@indices    # optional,
        type  => 'type'  | \@types      # required
    );

The "exists_type()" method checks for the existence of all specified types in all specified indices, and returns 1 or the empty string.

Query string parameters: "allow_no_indices", "expand_wildcards", "ignore_indices", "ignore_unavailable"

See the exists_type docs <http://www.elastic.co/guide/en/elasticsearch/reference/0.90/indices-types-exists.html> for more information.

    $response = $e->indices->delete_mapping(
        index => 'index' | \@indices    # required,
        type  => 'type'                 # required
    );

The "delete_mapping()" method deletes the type mappings (and all documents of that type) in all specified indices.

Query string parameters: "master_timeout"

See the delete_mapping docs <http://www.elastic.co/guide/en/elasticsearch/reference/0.90/indices-delete-mapping.html> for more information.

    $response = $e->indices->update_aliases(
        body => { actions }             # required
    );

The "update_aliases()" method changes (by adding or removing) multiple index aliases atomically. For instance:

    $response = $e->indices->update_aliases(
        body => {
            actions => [
                { add    => { alias => 'current', index => 'logs_2013_09' }},
                { remove => { alias => 'current', index => 'logs_2013_08' }}
            ]
        }
    );

Query string parameters: "master_timeout", "timeout"

See the update_aliases docs <http://www.elastic.co/guide/en/elasticsearch/reference/0.90/indices-aliases.html> for more information.

The "get_aliases()" method is deprecated in favour of "get_alias()".

    $result = $e->indices->get_aliases(
        index   => 'index' | \@indices      # optional
    );

The "get_aliases()" method returns a list of aliases per index for all the specified indices.

Query string parameters: "timeout"

See the get_aliases docs <http://www.elastic.co/guide/en/elasticsearch/reference/0.90/indices-aliases.html> for more information.

    $response = $e->indices->put_alias(
        index => 'index',                   # required
        name  => 'alias',                   # required

        body  => { alias defn }             # optional
    );

The "put_alias()" method creates a single index alias. For instance:

    $response = $e->indices->put_alias(
        index => 'my_index',
        name  => 'twitter',
        body => {
            filter => { term => { user_id => 'twitter' }}
        }
    );

Query string parameters: "master_timeout", "timeout"

See the put_alias docs <http://www.elastic.co/guide/en/elasticsearch/reference/0.90/indices-aliases.html> for more information.

    $result = $e->indices->get_alias(
        index   => 'index' | \@indices,     # optional
        name    => 'alias' | \@aliases      # optional
    );

The "get_alias()" method returns the alias definitions for the specified aliases in the specified indices.

Query string parameters: "allow_no_indices", "expand_wildcards", "ignore_indices", "ignore_unavailable"

See the get_alias docs <http://www.elastic.co/guide/en/elasticsearch/reference/0.90/indices-aliases.html> for more information.

    $bool = $e->indices->exists_alias(
        index   => 'index' | \@indices,     # optional
        name    => 'alias' | \@aliases      # optional
    );

The "exists_alias()" method returns 1 or the empty string depending on whether the specified aliases exist in the specified indices.

Query string parameters: "allow_no_indices", "expand_wildcards", "ignore_indices", "ignore_unavailable"

See the exists_alias docs <http://www.elastic.co/guide/en/elasticsearch/reference/0.90/indices-aliases.html> for more information.

    $response = $e->indices->delete_alias(
        index   => 'index',                 # required
        name    => 'alias'                  # required
    );

The "delete_alias()" method deletes a single alias in a single index.

Query string parameters: "master_timeout", "timeout"

See the delete_alias docs <http://www.elastic.co/guide/en/elasticsearch/reference/0.90/indices-aliases.html> for more information.

    $response = $e->indices->get_settings(
        index   => 'index' | \@indices      # optional

        body    => { settings }
    );

The "put_settings()" method sets the index settings for the specified indices or all indices. For instance:

    $response = $e->indices->put_settings(
        body => {
            "index.refresh_interval" => -1
        }
    );

Query string parameters: "master_timeout"

See the put_settings docs <http://www.elastic.co/guide/en/elasticsearch/reference/0.90/indices-update-settings.html> for more information.

    $result = $e->indices->get_settings(
        index   => 'index' | \@indices      # optional
    );

The "get_settings()" method retrieves the index settings for the specified indices or all indices.

See the get_settings docs <http://www.elastic.co/guide/en/elasticsearch/reference/0.90/indices-get-settings.html> for more information.

    $response = $e->indices->put_template(
        name => 'template'                  # required
        body => { template defn }           # required
    );

The "put_template()" method is used to create or update index templates.

Query string parameters: "master_timeout", "order", "timeout"

See the put_template docs <http://www.elastic.co/guide/en/elasticsearch/reference/0.90/indices-templates.html> for more information.

    $result = $e->indices->get_template(
        name  => 'template'                 # required
    );

The "get_template()" method is used to retrieve a named template.

See the get_template docs <http://www.elastic.co/guide/en/elasticsearch/reference/0.90/indices-templates.html> for more information.

    $response = $e->indices->delete_template(
        name  => 'template'                 # required
    );

The "delete_template()" method is used to delete a named template.

Query string parameters: "master_timeout", "timeout"

See the delete_template docs <http://www.elastic.co/guide/en/elasticsearch/reference/0.90/indices-templates.html> for more information.

    $response = $e->indices->put_warmer(
        index   => 'index' | \@indices,     # optional
        name    => 'warmer',                # required

        body    => { warmer defn }          # required
    );

The "put_warmer()" method is used to create or update named warmers which are used to warm up new segments in the index before they are exposed to user searches. For instance:

    $response = $e->indices->put_warmer(
        index   => 'my_index',
        name    => 'date_field_warmer',
        body    => {
            sort => 'date'
        }
    );

Query string parameters: "master_timeout"

See the put_warmer docs <http://www.elastic.co/guide/en/elasticsearch/reference/0.90/indices-warmers.html> for more information.

    $response = $e->indices->get_warmer(
        index   => 'index'  | \@indices,    # optional
        name    => 'warmer' | \@warmers,    # optional
    );

The "get_warmer()" method is used to retrieve warmers by name.

See the get_warmer docs <http://www.elastic.co/guide/en/elasticsearch/reference/0.90/indices-warmers.html> for more information.

    $response = $e->indices->get_warmer(
        index   => 'index'  | \@indices,    # required
        name    => 'warmer' | \@warmers,    # optional
    );

The "delete_warmer()" method is used to delete warmers by name.

Query string parameters: "master_timeout"

See the delete_warmer docs <http://www.elastic.co/guide/en/elasticsearch/reference/0.90/indices-warmers.html> for more information.

    $result = $e->indices->stats(
        index   => 'index' | \@indices      # optional
    );

The "stats()" method returns statistical information about one, more or all indices. Use the query string parameters to specify what information you want returned.

Query string parameters: "all", "allow_no_indices", "clear", "completion", "completion_fields", "docs", "expand_wildcards", "fielddata", "fielddata_fields", "fields", "filter_cache", "flush", "get", "groups", "id_cache", "ignore_indices", "ignore_unavailable", "indexing", "merge", "refresh", "search", "store", "warmer"

See the stats docs <http://www.elastic.co/guide/en/elasticsearch/reference/0.90/indices-stats.html> for more information.

    $result = $e->indices->status(
        index   => 'index' | \@indices      # optional
    );

Deprecated.

Query string parameters: "allow_no_indices", "expand_wildcards", "ignore_indices", "ignore_unavailable", "recovery", "snapshot"

See the status docs <http://www.elastic.co/guide/en/elasticsearch/reference/0.90/indices-status.html> for more information.

    $result = $e->indices->segments(
        index   => 'index' | \@indices      # optional
    );

The "segments()" method is used to return information about the segments that an index contains.

Query string parameters: "allow_no_indices", "expand_wildcards", "ignore_indices", "ignore_unavailable"

See the segments docs <http://www.elastic.co/guide/en/elasticsearch/reference/0.90/indices-segments.html> for more information.

    $result = $e->indices->analyze(
        index   => 'index'                  # optional,
        body    => 'text to analyze'
    );

The "analyze()" method passes the text in the "body" through the specified "analyzer", "tokenizer" or token "filter" - which may be global, or associated with a particular index or field - and returns the tokens. Very useful for debugging analyzer configurations.

Query string parameters: "analyzer", "field", "filters", "format", "index", "prefer_local", "text", "tokenizer"

See the analyze docs <http://www.elastic.co/guide/en/elasticsearch/reference/0.90/indices-analyze.html> for more information.

    $result = $e->indices->validate_query(
        index   => 'index' | \@indices,     # optional
        body    => { query }
    );

The "validate_query()" method accepts a query in the "body" and checks whether the query is valid or not. Most useful when "explain" is set to "true", in which case it includes an execution plan in the output.

Query string parameters: "allow_no_indices", "expand_wildcards", "explain", "ignore_indices", "ignore_unavailable", "q", "source"

See the validate_query docs <http://www.elastic.co/guide/en/elasticsearch/reference/0.90/indices-validate.html> for more information.

Clinton Gormley <drtech@cpan.org>

This software is Copyright (c) 2017 by Elasticsearch BV.

This is free software, licensed under:

  The Apache License, Version 2.0, January 2004
2017-04-02 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.