class Elastic::Datatypes::Default

Constants

MAPPING_OPTIONS

Attributes

name[R]
user_options[R]

Public Class Methods

new(_name, _options) click to toggle source
# File lib/elastic/datatypes/default.rb, line 11
def initialize(_name, _options)
  @name = _name
  @user_options = _options
end

Public Instance Methods

date_histogram_aggregation_defaults() click to toggle source
# File lib/elastic/datatypes/default.rb, line 58
def date_histogram_aggregation_defaults
  {}
end
histogram_aggregation_defaults() click to toggle source
# File lib/elastic/datatypes/default.rb, line 62
def histogram_aggregation_defaults
  {}
end
mapping_options() click to toggle source
# File lib/elastic/datatypes/default.rb, line 16
def mapping_options
  @user_options.slice(*MAPPING_OPTIONS)
end
match_query_defaults() click to toggle source
# File lib/elastic/datatypes/default.rb, line 46
def match_query_defaults
  {}
end
prepare_for_index(_value) click to toggle source
# File lib/elastic/datatypes/default.rb, line 24
def prepare_for_index(_value)
  _value
end
prepare_for_query(_value) click to toggle source
# File lib/elastic/datatypes/default.rb, line 20
def prepare_for_query(_value)
  prepare_for_index _value
end
prepare_value_for_result(_value) click to toggle source
# File lib/elastic/datatypes/default.rb, line 28
def prepare_value_for_result(_value)
  _value
end
range_aggregation_defaults() click to toggle source
# File lib/elastic/datatypes/default.rb, line 66
def range_aggregation_defaults
  {}
end
range_query_defaults() click to toggle source
# File lib/elastic/datatypes/default.rb, line 50
def range_query_defaults
  {}
end
supported_aggregations() click to toggle source
# File lib/elastic/datatypes/default.rb, line 32
def supported_aggregations
  [:terms, :histogram, :range]
end
supported_queries() click to toggle source
# File lib/elastic/datatypes/default.rb, line 36
def supported_queries
  [:term, :range]
end
term_query_defaults() click to toggle source

default configurations

# File lib/elastic/datatypes/default.rb, line 42
def term_query_defaults
  {}
end
terms_aggregation_defaults() click to toggle source
# File lib/elastic/datatypes/default.rb, line 54
def terms_aggregation_defaults
  { size: 10000 } # amount of groups to return by default
end