class Boolminot::Clauses::Nested
Attributes
clause[R]
opts[R]
path[R]
Public Class Methods
new(path, clause, opts)
click to toggle source
# File lib/boolminot/clauses/nested.rb, line 6 def initialize(path, clause, opts) @path = path @clause = clause @opts = opts end
Public Instance Methods
to_elasticsearch(options = {})
click to toggle source
# File lib/boolminot/clauses/nested.rb, line 12 def to_elasticsearch(options = {}) default_options = { context: :filter } options = default_options.merge(options) context = options.fetch(:context) inner = clause.to_elasticsearch(options) { type => { path: path }.merge(context => inner).merge(opts) } end