Class: OpenSearch::DSL::Search::Queries::Range

Inherits:
Object
  • Object
show all
Includes:
BaseComponent
Defined in:
lib/opensearch/dsl/search/queries/range.rb

Overview

A query which returns documents matching the specified range

Examples:

Find documents within a numeric range


search do
  query do
    range :age do
      gte 10
      lte 20
    end
  end
end

Find documents published within a date range


search do
  query do
    range :published_on do
      gte '2013-01-01'
      lte 'now'
      time_zone '+1:00'
    end
  end
end

Method Summary

Methods included from BaseComponent

included, #initialize