Class: OpenSearch::DSL::Search::Filters::GeoPolygon

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

Overview

A filter which returns documents which fall into a specified geographical polygon

See the integration test for a working example.

Examples:


search do
  query do
    filtered do
      filter do
        geo_polygon :location do
          points [
           [14.2244355,49.9419006],
           [14.2244355,50.1774301],
           [14.7067869,50.1774301],
           [14.7067869,49.9419006],
           [14.2244355,49.9419006]
          ]
        end
      end
    end
  end
end

See Also:

Method Summary

Methods included from BaseComponent

included, #initialize