Module: OpenSearch::DSL

Defined in:
lib/opensearch/dsl.rb,
lib/opensearch/dsl/utils.rb,
lib/opensearch/dsl/search.rb,
lib/opensearch/dsl/version.rb,
lib/opensearch/dsl/search/sort.rb,
lib/opensearch/dsl/search/query.rb,
lib/opensearch/dsl/search/filter.rb,
lib/opensearch/dsl/search/options.rb,
lib/opensearch/dsl/search/suggest.rb,
lib/opensearch/dsl/search/highlight.rb,
lib/opensearch/dsl/search/filters/or.rb,
lib/opensearch/dsl/search/aggregation.rb,
lib/opensearch/dsl/search/filters/and.rb,
lib/opensearch/dsl/search/filters/ids.rb,
lib/opensearch/dsl/search/filters/not.rb,
lib/opensearch/dsl/search/queries/ids.rb,
lib/opensearch/dsl/search/filters/bool.rb,
lib/opensearch/dsl/search/filters/term.rb,
lib/opensearch/dsl/search/filters/type.rb,
lib/opensearch/dsl/search/queries/bool.rb,
lib/opensearch/dsl/search/queries/term.rb,
lib/opensearch/dsl/search/filters/limit.rb,
lib/opensearch/dsl/search/filters/query.rb,
lib/opensearch/dsl/search/filters/range.rb,
lib/opensearch/dsl/search/filters/terms.rb,
lib/opensearch/dsl/search/queries/fuzzy.rb,
lib/opensearch/dsl/search/queries/match.rb,
lib/opensearch/dsl/search/queries/range.rb,
lib/opensearch/dsl/search/queries/terms.rb,
lib/opensearch/dsl/search/base_component.rb,
lib/opensearch/dsl/search/filters/exists.rb,
lib/opensearch/dsl/search/filters/nested.rb,
lib/opensearch/dsl/search/filters/prefix.rb,
lib/opensearch/dsl/search/filters/regexp.rb,
lib/opensearch/dsl/search/filters/script.rb,
lib/opensearch/dsl/search/queries/common.rb,
lib/opensearch/dsl/search/queries/exists.rb,
lib/opensearch/dsl/search/queries/nested.rb,
lib/opensearch/dsl/search/queries/prefix.rb,
lib/opensearch/dsl/search/queries/regexp.rb,
lib/opensearch/dsl/search/filters/indices.rb,
lib/opensearch/dsl/search/filters/missing.rb,
lib/opensearch/dsl/search/queries/dis_max.rb,
lib/opensearch/dsl/search/queries/indices.rb,
lib/opensearch/dsl/search/queries/span_or.rb,
lib/opensearch/dsl/search/aggregations/avg.rb,
lib/opensearch/dsl/search/aggregations/max.rb,
lib/opensearch/dsl/search/aggregations/min.rb,
lib/opensearch/dsl/search/aggregations/sum.rb,
lib/opensearch/dsl/search/queries/boosting.rb,
lib/opensearch/dsl/search/queries/filtered.rb,
lib/opensearch/dsl/search/queries/span_not.rb,
lib/opensearch/dsl/search/queries/template.rb,
lib/opensearch/dsl/search/queries/wildcard.rb,
lib/opensearch/dsl/search/filters/geo_shape.rb,
lib/opensearch/dsl/search/filters/has_child.rb,
lib/opensearch/dsl/search/filters/match_all.rb,
lib/opensearch/dsl/search/queries/geo_shape.rb,
lib/opensearch/dsl/search/queries/has_child.rb,
lib/opensearch/dsl/search/queries/match_all.rb,
lib/opensearch/dsl/search/queries/span_near.rb,
lib/opensearch/dsl/search/queries/span_term.rb,
lib/opensearch/dsl/search/aggregations/range.rb,
lib/opensearch/dsl/search/aggregations/stats.rb,
lib/opensearch/dsl/search/aggregations/terms.rb,
lib/opensearch/dsl/search/filters/has_parent.rb,
lib/opensearch/dsl/search/queries/has_parent.rb,
lib/opensearch/dsl/search/queries/span_first.rb,
lib/opensearch/dsl/search/queries/span_multi.rb,
lib/opensearch/dsl/search/aggregations/filter.rb,
lib/opensearch/dsl/search/aggregations/global.rb,
lib/opensearch/dsl/search/aggregations/nested.rb,
lib/opensearch/dsl/search/filters/geo_polygon.rb,
lib/opensearch/dsl/search/queries/multi_match.rb,
lib/opensearch/dsl/search/aggregations/filters.rb,
lib/opensearch/dsl/search/aggregations/missing.rb,
lib/opensearch/dsl/search/filters/geo_distance.rb,
lib/opensearch/dsl/search/filters/geohash_cell.rb,
lib/opensearch/dsl/search/queries/match_phrase.rb,
lib/opensearch/dsl/search/queries/query_string.rb,
lib/opensearch/dsl/search/queries/top_children.rb,
lib/opensearch/dsl/search/aggregations/children.rb,
lib/opensearch/dsl/search/aggregations/ip_range.rb,
lib/opensearch/dsl/search/aggregations/top_hits.rb,
lib/opensearch/dsl/search/aggregations/composite.rb,
lib/opensearch/dsl/search/aggregations/histogram.rb,
lib/opensearch/dsl/search/queries/constant_score.rb,
lib/opensearch/dsl/search/queries/function_score.rb,
lib/opensearch/dsl/search/queries/more_like_this.rb,
lib/opensearch/dsl/search/aggregations/date_range.rb,
lib/opensearch/dsl/search/aggregations/geo_bounds.rb,
lib/opensearch/dsl/search/queries/fuzzy_like_this.rb,
lib/opensearch/dsl/search/aggregations/cardinality.rb,
lib/opensearch/dsl/search/aggregations/percentiles.rb,
lib/opensearch/dsl/search/aggregations/value_count.rb,
lib/opensearch/dsl/search/filters/geo_bounding_box.rb,
lib/opensearch/dsl/search/aggregations/geo_distance.rb,
lib/opensearch/dsl/search/aggregations/geohash_grid.rb,
lib/opensearch/dsl/search/base_aggregation_component.rb,
lib/opensearch/dsl/search/filters/geo_distance_range.rb,
lib/opensearch/dsl/search/aggregations/date_histogram.rb,
lib/opensearch/dsl/search/aggregations/extended_stats.rb,
lib/opensearch/dsl/search/aggregations/reverse_nested.rb,
lib/opensearch/dsl/search/queries/match_phrase_prefix.rb,
lib/opensearch/dsl/search/queries/simple_query_string.rb,
lib/opensearch/dsl/search/aggregations/scripted_metric.rb,
lib/opensearch/dsl/search/aggregations/percentile_ranks.rb,
lib/opensearch/dsl/search/queries/fuzzy_like_this_field.rb,
lib/opensearch/dsl/search/aggregations/significant_terms.rb,
lib/opensearch/dsl/search/base_compound_filter_component.rb,
lib/opensearch/dsl/search/aggregations/pipeline/avg_bucket.rb,
lib/opensearch/dsl/search/aggregations/pipeline/derivative.rb,
lib/opensearch/dsl/search/aggregations/pipeline/max_bucket.rb,
lib/opensearch/dsl/search/aggregations/pipeline/min_bucket.rb,
lib/opensearch/dsl/search/aggregations/pipeline/moving_avg.rb,
lib/opensearch/dsl/search/aggregations/pipeline/sum_bucket.rb,
lib/opensearch/dsl/search/aggregations/pipeline/bucket_sort.rb,
lib/opensearch/dsl/search/aggregations/pipeline/serial_diff.rb,
lib/opensearch/dsl/search/aggregations/pipeline/stats_bucket.rb,
lib/opensearch/dsl/search/aggregations/pipeline/bucket_script.rb,
lib/opensearch/dsl/search/aggregations/pipeline/cumulative_sum.rb,
lib/opensearch/dsl/search/aggregations/pipeline/bucket_selector.rb,
lib/opensearch/dsl/search/aggregations/pipeline/percentiles_bucket.rb,
lib/opensearch/dsl/search/aggregations/pipeline/extended_stats_bucket.rb

Overview

The main module, which can be included into your own class or namespace, to provide the DSL methods.

Examples:


include OpenSearch::DSL

definition = search do
  query do
    match title: 'test'
  end
end

definition.to_hash
# => { query: { match: { title: "test"} } }

See Also:

Defined Under Namespace

Modules: Search, Utils

Constant Summary collapse

VERSION =
"0.2.1"

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



68
69
70
# File 'lib/opensearch/dsl.rb', line 68

def self.included(base)
  base.__send__ :include, OpenSearch::DSL::Search
end