We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 184ae36 commit 1be83baCopy full SHA for 1be83ba
spec/es_spec_helper.rb
@@ -30,17 +30,19 @@ def todays_date
30
Time.now.strftime("%Y.%m.%d")
31
end
32
33
- def mapping_name
+
34
+ def default_mapping_from_mappings(mappings)
35
if ESHelper.es_version_satisfies?(">=7")
- nil
36
+ mappings
37
else
- "_default_"
38
+ mappings["_default_"]
39
40
41
42
def field_properties_from_template(template_name, field)
43
mappings = @es.indices.get_template(name: template_name)[template_name]["mappings"]
- (mapping_name.nil?) ? mappings["properties"][field]["properties"] : mappings[mapping_name]["properties"][field]["properties"]
44
+ mapping = default_mapping_from_mappings(mappings)
45
+ mapping["properties"][field]["properties"]
46
47
48
def routing_field_name
0 commit comments