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

elastic

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

elastic

  • 0.3.2
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Elastic

Elasticsearch utilities built on top of official elasticsearch gem.

Installation

Add this line to your application's Gemfile:

gem 'elastic'

Configuration

Configure the lib in your application's initializers:

Elastic.configure do |config|
  config.namespace = "#{ENV['ELASTICSEARCH_NAMESPACE'] || "myapp-#{Rails.env}"

  config.logger =
    if !!(ENV['ELASTICSEARCH_LOGGER'] || Rails.env.development?)
      (ENV['ELASTICSEARCH_LOGGER'] || Rails.logger)
    end

  config.clusters = {
    default: ENV['ELASTICSEARCH_URL'],

    # Optional, additional clusters
    analytics: ENV['ELASTICSEARCH_ANALYTICS_CLUSTER_URL'],
    search: ENV['ELASTICSEARCH_SEARCH_CLUSTER_URL']
  }
end

Elasticsearch compatibility

This library is compatible with Elasticsearch 7 and higher.

Multi-cluster support

You can connect to any cluster defined in configuration by specifying its name, e.g. Elastic.client(:search), or connect to a default one with Elastic.client.

Documentation

TBD

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

License

See LICENSE.txt file.

FAQs

Package last updated on 25 Jun 2021

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