es -- The command line client of ElasticSearch.
# List document count / size per index / type es ls es ls-types <index> # Create / delete an index es create <index> es delete <index> # Indexing / getting a document es put <index> <doc> # doc needs to be a JSON file es get <name> <type> <doc_id> # Search by a field es search <name> <type> <field>:<search string> [<size>] # Aliasing es alias <index-name> <alias> es unalias <index-name> <alias>
See `perldoc es` for more info.
This program can be used to basic manipulation for day-to-day development need with ElasticSearch server. The default server is localhost:9200, to use different server, you can change it with ELASTIC_SEARCH_SERVERS environment variable.
localhost:9200
ELASTIC_SEARCH_SERVERS
ESASTIC_SEARCH_SERVERS=search-server.company.com:9200
You may supply a list of servers seperate by comma
ESASTIC_SEARCH_SERVERS=search-server-1.company.com:9200,search-server-2.company.com:9200
The list of servers are used in a round-robin manner, which is the default behaviour of the underlying ElasticSearch perl module.
List all indices. Or if a sub-string is provided, list only matching ones.
List all document type of the given index.
Create the index.
Delete the index
Add an alias for the index.
Remove an alias to the index.
Put the content of doc into the index. <type> is the the documentation type. <doc> must be a valid JSON file.
Print the specic document as JSON.
Perform a simple text query. Need to provide field name and a query string.
Mickey Nasriachi <mickey75@gmail.com>
Kang-min Liu <gugod@gugod.org>
This module was originally developed for Booking.com. With approval from Booking.com, this module was generalized and published on CPAN, for which the authors would like to express their gratitude.
Copyright (C) 2013 by Mickey Nasriachi
Copyright (C) 2013 by Kang-min Liu
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install App::es, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::es
CPAN shell
perl -MCPAN -e shell install App::es
For more information on module installation, please visit the detailed CPAN module installation guide.