1. Ruby /
  2. Integrations

Elasticsearch DSL

The elasticsearch-dsl gem provides a Ruby API for the Elasticsearch Query DSL. The library allows to programmatically build complex search definitions for Elasticsearch in Ruby, which are translated to Hashes, and ultimately, JSON, the language of Elasticsearch.

See the README for more information.

Previous
Persistence
Next
Examples
  • View as Markdown
  • Edit this page
  • Ruby

  • Ruby
    • Getting started
    • Installation
    • Connecting
    • Configuration
      • Basic configuration
      • Advanced configuration
    • Integrations
      • Transport
      • Elasticsearch API
      • Using OpenTelemetry
      • Elastic Common Schema (ECS)
      • ActiveModel / ActiveRecord
      • Ruby On Rails
      • Persistence
      • Elasticsearch DSL
    • Examples
    • Client helpers
      • Bulk and Scroll helpers
      • ES|QL
    • Troubleshoot
  • Elasticsearch Ruby Client
    • Known issues
    • Breaking changes
    • Deprecations
Elastic logo

© 2026 Elasticsearch B.V. All Rights Reserved.

  • Terms of Use
  • Privacy