index.asciidoc 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. = elasticsearch-ruby
  2. == Overview
  3. There's a suite of official Ruby libraries for Elasticsearch, which provide a client for connecting
  4. to Elasticsearch clusters, Ruby interface to the REST API, and more.
  5. See the full documentation at http://github.com/elasticsearch/elasticsearch-ruby.
  6. === Installation
  7. Install the Ruby gem with:
  8. [source,sh]
  9. ------------------------------------
  10. gem install elasticsearch
  11. ------------------------------------
  12. or add it do your Gemfile:
  13. [source,ruby]
  14. ------------------------------------
  15. gem 'elasticsearch'
  16. ------------------------------------
  17. === Example Usage
  18. [source,ruby]
  19. ------------------------------------
  20. require 'elasticsearch'
  21. client = Elasticsearch::Client.new log: true
  22. client.cluster.health
  23. client.index index: 'my-index', type: 'my-document', id: 1, body: { title: 'Test' }
  24. client.indices.refresh index: 'my-index'
  25. client.search index: 'my-index', body: { query: { match: { title: 'test' } } }
  26. ------------------------------------
  27. === Features at a Glance
  28. * Pluggable logging and tracing
  29. * Plugabble connection selection strategies (round-robin, random, custom)
  30. * Pluggable transport implementation, customizable and extendable
  31. * Pluggable serializer implementation
  32. * Request retries and dead connections handling
  33. * Node reloading (based on cluster state) on errors or on demand
  34. * Modular API implementation
  35. * 100% REST API coverage
  36. == Copyright and License
  37. This software is Copyright (c) 2013 by Elasticsearch BV.
  38. This is free software, licensed under The Apache License Version 2.0.