Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

elasticsearch-ruby

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

elasticsearch-ruby

  • 0.0.4
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

elasticsearch-client

An elastic search ruby library with multiple transport support originall built for use with SoundTracking.

DISCLAIMER: Quite a bit more work to be done till production ready, use at your own risk! :)

Installation

$ gem install elasticsearch-ruby

Usage


transport = ElasticSearch::HTTPTransport.new(['http://localhost:9200'])
client = ElasticSearch::Client.new(transport)

index = client.create_index('twitter')
index['tweet'].put(1, { foo: 'bar' })

query = { query: { query_string: { query: 'bar' } } }
results = index['tweet'].search

results.total                         # 1

results.each do |result|
  result.score                        # 1.0
  result['foo']                       # bar
end

client['twitter'].search(query).type  # 'tweet'

TODO:

  • Better configuration support
  • Failover and retry code
  • Better unicode suppoort with Thrift
  • Support for Memcache Transport
  • Query Builder and block support
  • Stats, Health lookup methods
  • Better error handling
  • Documentation

FAQs

Package last updated on 12 Jun 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc