78
79
80
81
82
83
84
85
86
87
88
89
|
# File 'lib/elastic/nodes/boolean.rb', line 78
def render(_options = {})
hash = {}
hash['must'] = @musts.map { |n| n.render(_options) } if !@musts.empty?
hash['must_not'] = @must_nots.map { |n| n.render(_options) } if !@must_nots.empty?
hash['should'] = @shoulds.map { |n| n.render(_options) } if !@shoulds.empty?
hash['filters'] = @filters.map { |n| n.render(_options) } if !@filters.empty?
hash['minimum_should_match'] = minimum_should_match unless minimum_should_match.nil?
hash['disable_coord'] = true if disable_coord
render_boost(hash)
{ "bool" => hash }
end
|