Code Monkey home page Code Monkey logo

elastico's Introduction

Elastico Gitter Build Status

The elastico utility works on your Elasticsearch cluster(s). You can use it to gain cluster status, search through indexes and types, copy indexes from one cluster to another, create and restore backups.

State

Elastico is work in progress. The software is by no means ready.

Install

Installation using Brew is most convenient. Brew will compile the source and maintain the installation.

Install using Brew

$ brew tap dutchcoders/homebrew-elastico
$ brew install elastico

Compiling from sourcecode

Make sure at least Go 1.6 is installed.

$ go get github.com/dutchcoders/elastico

Contributions

Contributions are welcome.

Creators

Remco Verhoef

Copyright and license

Code and documentation copyright 2016 Remco Verhoef.

Usage

The -json parameter will give you the plain json output instead of the formatted output.

The -host parameter defines the url of the elasticsearch cluster to operate on.

The -debug parameter defines debugging mode for all requests and responses.

For convenience, the following environment variables can be set:

ELASTICO_HOST the server to use e.g. http://127.0.0.1:9200/

ELASTICO_INDEX the index to use

ELASTICO_TYPE the type to use

Templates

Every output template can be customized by creating a Go template in "~/.elastico" with the name of the command. The template will get the object of the response as its parameter. For example you can create a index:stats.template to customize the output as you like.

Cluster

Health

$ elastico cluster:health 

State

$ elastico cluster:state

Index

Create

Create a new index.

$ elastico index:create -index {name}

Delete

Delete the index.

$ elastico index:delete -index {name}

Copy

This command will copy an index (type) from a location to another location. This can be on the same cluster, or on a different one.

$ elastico index:copy (-index {index}) (-type {type}) {dest}

Stats

This command will show you the stats of the index(es) or all indexes.

$ elastico index:stats (-index {index})

Get

This command will retrieve info and settings about the index(es) or all indexes.

$ elastico index:get (-index {index})

Recovery

$ elastico index:recovery -index {index} 

Snapshots

All

Show snapshots.

$ elastico snapshots

Register

$ elastico snapshot:register -location {location} -type fs {name}

Status

$ elastico snapshot:status

Search

Search will search through the indexes and show the relevant highlighted results.

$ elastico search (-disable-highlight) (-index {index}) (-type {type}) your-query

You can also define your own query, and pipe it to elastico.

$ cat query.json | elastico search (-index {index}) (-type {type})

Document

Get

The get command allows to get a typed JSON document from the index based on its id.

$ elastico document:get -index {index} -type {type} {documentid}

Put

$ cat doc.json | elastico document:put -index {index} -type {type} {documentid}

Analyze

Performs the analysis process on a text on a specific index and return the tokens breakdown of the text.

$ elastico analyze -index {index} -field {field} text-to-analyze

Mapping

Edit

Edit will open your default editor with the current mapping of the type. The modifications you'll make will be send to Elasticsearch.

$ elastico mapping:edit -index {index} -type {type} 

elastico's People

Contributors

nl5887 avatar

Stargazers

Jorge 5 Peribañez avatar  avatar zbv avatar 5l1v3r1 avatar John Nunez avatar Nomadic avatar quyencv avatar Himanshu Pal avatar Kent Gruber avatar Dong avatar Lena Kushleyeva avatar Changsu Jiang avatar TENSORTALK avatar Nissan Pow avatar John Goodall avatar Madson Viana avatar Serge Simard avatar Madhu Akula avatar Spacial avatar Erkid Hoxholli avatar Li Huanshuai avatar Xu Tao avatar Ben Bytheway avatar  avatar Ðietrich ₸rautmann avatar Lukasz Konopski avatar Hasan Tayyar Beşik avatar Si Nguyen avatar Andrew avatar

Watchers

Nissan Pow avatar James Cloos avatar  avatar  avatar

Forkers

5l1v3r1 isgasho

elastico's Issues

Brew tap not working

brew tap is throwing an error:

$ brew tap dutchcoders/homebrew-elastico
==> Tapping dutchcoders/elastico
Cloning into '/usr/local/Library/Taps/dutchcoders/homebrew-elastico'...
remote: Counting objects: 7, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 7 (delta 0), reused 7 (delta 0), pack-reused 0
Unpacking objects: 100% (7/7), done.
Checking connectivity... done.
Error: Invalid formula: /usr/local/Library/Taps/dutchcoders/homebrew-elastico/Formula/elastico.rb
/usr/local/Library/Taps/dutchcoders/homebrew-elastico/Formula/elastico.rb:1: class/module name must be CONSTANT
class elastico < Formula
                ^
Error: Cannot tap dutchcoders/elastico: invalid syntax in tap!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.