Class: Elastic::Datatypes::Default
- Inherits:
-
Object
- Object
- Elastic::Datatypes::Default
- Defined in:
- lib/elastic/datatypes/default.rb
Constant Summary collapse
- MAPPING_OPTIONS =
[ :type, :analyzer, :boost, :coerce, :copy_to, :doc_values, :dynamic, :enabled, :fielddata, :geohash, :geohash_precision, :geohash_prefix, :format, :ignore_above, :ignore_malformed, :include_in_all, :index_options, :lat_lon, :index, :fields, :norms, :null_value, :position_increment_gap, :properties, :search_analyzer, :similarity, :store, :term_vector ]
Instance Method Summary collapse
- #date_histogram_aggregation_defaults ⇒ Object
- #histogram_aggregation_defaults ⇒ Object
-
#initialize(_name, _options) ⇒ Default
constructor
A new instance of Default.
- #mapping_options ⇒ Object
- #match_query_defaults ⇒ Object
- #prepare_for_index(_value) ⇒ Object
- #prepare_for_query(_value) ⇒ Object
- #prepare_value_for_result(_value) ⇒ Object
- #range_aggregation_defaults ⇒ Object
- #range_query_defaults ⇒ Object
- #supported_aggregations ⇒ Object
- #supported_queries ⇒ Object
-
#term_query_defaults ⇒ Object
default configurations.
- #terms_aggregation_defaults ⇒ Object
Constructor Details
#initialize(_name, _options) ⇒ Default
Returns a new instance of Default.
11 12 13 14 |
# File 'lib/elastic/datatypes/default.rb', line 11 def initialize(_name, ) @name = _name @user_options = end |
Instance Method Details
#date_histogram_aggregation_defaults ⇒ Object
58 59 60 |
# File 'lib/elastic/datatypes/default.rb', line 58 def date_histogram_aggregation_defaults {} end |
#histogram_aggregation_defaults ⇒ Object
62 63 64 |
# File 'lib/elastic/datatypes/default.rb', line 62 def histogram_aggregation_defaults {} end |
#mapping_options ⇒ Object
16 17 18 |
# File 'lib/elastic/datatypes/default.rb', line 16 def @user_options.slice(*MAPPING_OPTIONS) end |
#match_query_defaults ⇒ Object
46 47 48 |
# File 'lib/elastic/datatypes/default.rb', line 46 def match_query_defaults {} end |
#prepare_for_index(_value) ⇒ Object
24 25 26 |
# File 'lib/elastic/datatypes/default.rb', line 24 def prepare_for_index(_value) _value end |
#prepare_for_query(_value) ⇒ Object
20 21 22 |
# File 'lib/elastic/datatypes/default.rb', line 20 def prepare_for_query(_value) prepare_for_index _value end |
#prepare_value_for_result(_value) ⇒ Object
28 29 30 |
# File 'lib/elastic/datatypes/default.rb', line 28 def prepare_value_for_result(_value) _value end |
#range_aggregation_defaults ⇒ Object
66 67 68 |
# File 'lib/elastic/datatypes/default.rb', line 66 def range_aggregation_defaults {} end |
#range_query_defaults ⇒ Object
50 51 52 |
# File 'lib/elastic/datatypes/default.rb', line 50 def range_query_defaults {} end |
#supported_aggregations ⇒ Object
32 33 34 |
# File 'lib/elastic/datatypes/default.rb', line 32 def supported_aggregations [:terms, :histogram, :range] end |
#supported_queries ⇒ Object
36 37 38 |
# File 'lib/elastic/datatypes/default.rb', line 36 def supported_queries [:term, :range] end |
#term_query_defaults ⇒ Object
default configurations
42 43 44 |
# File 'lib/elastic/datatypes/default.rb', line 42 def term_query_defaults {} end |
#terms_aggregation_defaults ⇒ Object
54 55 56 |
# File 'lib/elastic/datatypes/default.rb', line 54 def terms_aggregation_defaults { size: 10000 } # amount of groups to return by default end |