Home

Awesome

Elastic Enterprise Search Client

rubocop Ruby Style Guide build Build status

Official Ruby API client for Elastic Enterprise Search. Use this gem to integrate App Search and Workplace Search into your Ruby code.

Installation

Install the elastic-enterprise-search gem from Rubygems:

$ gem install elastic-enterprise-search

Or add it to your project's Gemfile:

gem 'elastic-enterprise-search', 'VERSION'

The Enterprise Search client is implemented with elastic-transport as the HTTP layer, which uses Faraday. Faraday supports several adapters and will use Net::HTTP by default. For optimal performance with the Enterprise Search API, we suggest using an HTTP library which supports persistent ("keep-alive") connections. For the standard Ruby implementation, this could be Net::HTTP::Persistent, patron or Typhoeus. For JRuby, Manticore is a great option as well. Require the library for the adapter in your code and then pass in the :adapter parameter to the client when you initialize it:

require 'elastic-enterprise-search'
require 'faraday/net_http_persistent'

client = Elastic::EnterpriseSearch::Client.new(adapter: :net_http_persistent)

If an adapter is not specified, the client will try to auto-detect available libraries and use the best available HTTP client.

Documentation

See the documentation for usage, code examples, configuring the client, and an API reference.

See code examples of usage for the Enterprise Search, App Search and Workplace Search APIs.

Compatibility

We follow Ruby’s own maintenance policy and officially support all currently maintained versions per Ruby Maintenance Branches.

Development

See CONTRIBUTING.

License

This software is licensed under the Apache 2 license. See NOTICE.