module Aggregations::Helpers::ValuesSourceAggregationHelper

Public Instance Methods

field(field) click to toggle source

@param [String] field @return [ValuesSourceAggregationHelper]

# File lib/aggregations/helpers/values_source_aggregation_helper.rb, line 17
def field field
  @field = field
  self
end
field_expr() click to toggle source

@return [String]

# File lib/aggregations/helpers/values_source_aggregation_helper.rb, line 23
def field_expr
  @field
end
missing(missing) click to toggle source

@param [String] @return [ValuesSourceAggregationHelper]

# File lib/aggregations/helpers/values_source_aggregation_helper.rb, line 41
def missing missing
  @missing = missing
  self
end
missing_expr() click to toggle source

@return [String]

# File lib/aggregations/helpers/values_source_aggregation_helper.rb, line 47
def missing_expr
  @missing
end
script(script) click to toggle source

@param [Misc::Script] script @return [ValuesSourceAggregationHelper]

# File lib/aggregations/helpers/values_source_aggregation_helper.rb, line 29
def script script
  @script = script
  self
end
script_expr() click to toggle source

@return [Misc::Script]

# File lib/aggregations/helpers/values_source_aggregation_helper.rb, line 35
def script_expr
  @script
end
value_source_agg_builder() click to toggle source

helper method to add values source attributes to aggregation.

# File lib/aggregations/helpers/values_source_aggregation_helper.rb, line 7
def value_source_agg_builder
  builder = {}
  builder[:field] = @field if @field.present?
  builder[:script] = @script.settings if @script.present?
  builder[:missing] = @missing if @missing.present?
  builder
end