Skip to content

Conversation

@robbavey
Copy link
Member

No description provided.

@elasticsearch-bot elasticsearch-bot self-assigned this Jan 22, 2019
Time.now.strftime("%Y.%m.%d")
end

def mapping_name
Copy link
Member

@jsvd jsvd Jan 22, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method becomes a bit less useful now, could we maybe replace it with just

def default_mapping_from_mappings(mappings)
  if ESHelper.es_version_satisfies?(">=7")
    mappings
  else
    mappings["_default_"]  
  end
end

and then:

  def field_properties_from_template(template_name, field)
    mappings = @es.indices.get_template(name: template_name)[template_name]["mappings"]
    mapping = default_mapping_from_mappings(mappings)
    mapping["properties"][field]["properties"]
  end

what do you think?

Copy link
Member

@jsvd jsvd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM pending on green

@elasticsearch-bot
Copy link

Rob Bavey merged this into the following branches!

Branch Commits
master 184ae36, 1be83ba

elasticsearch-bot pushed a commit that referenced this pull request Jan 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants