Project

stretch

0.01
No commit activity in last 3 years
No release in over 3 years
An Elasticsearch client library
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.2
~> 4.0
>= 0
>= 0

Runtime

~> 0.8.0
~> 1.7.2
 Project Readme

Stretch

Build Status Code Climate Status

Elasticsearch client library written for people who like understandable documentation and understandable code.

Installation

Add this line to your application's Gemfile:

gem 'stretch'

And then execute:

$ bundle

Or install it yourself as:

$ gem install stretch

Usage

Establishing a connection:

$stretch = Stretch::Client.new :url => "http://127.0.0.1:9200/"

Cluster and Index Health

$stretch.cluster.health :timeout => '10s'
$stretch.index('tweets').health :wait_for_status => 'green'

Cluster State

$stretch.cluster.state
$stretch.cluster.state :filter_nodes => true

Cluster and Index Settings

$stretch.cluster.settings :persistent => {
  "cluster.routing.allocation.node_concurrent_recoveries" => 4
}

$stretch.index('foo').settings :index => { :number_of_replicas => 2 }

Opening and Closing Indices

$stretch.index('foo').open!
$stretch.index('bar').close!