Class: Elasticsearch::DSL::Search::Queries::SpanNear

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

Overview

A query which returns documents matching spans near each other

Examples:


search do
  query do
    span_near clauses: [ { span_term: { title: 'disaster' } }, { span_term: { title: 'health' } } ],
              slop: 10
  end
end

See Also:

Method Summary

Methods included from BaseComponent

included, #initialize