Class: OpenSearch::DSL::Search::Filters::Exists

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

Overview

A filter which returns documents which have a non-‘null` value in the specified field (ie. the reverse of the `missing` filter)

Examples:


search do
  query do
    filtered do
      filter do
        exists field: 'occupation'
      end
    end
  end
end

See Also:

Method Summary

Methods included from BaseComponent

included, #initialize