Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

Prevent mapping issues by manually creating the mapping for resources #1

Open
Mark-H opened this issue Feb 28, 2016 · 0 comments
Open

Comments

@Mark-H
Copy link
Member

Mark-H commented Feb 28, 2016

ElasticSearch tries to guess the mapping based on the first provided data. This can cause issues like this:

Exception 400 while indexing resource 1: {"error":"MapperParsingException[failed to parse [editedon]]; nested: NumberFormatException[For input string: \"2016-02-28 21:22:06\"]; ","status":400}

In that specific case, the first resource sent to ES was probably never edited (or just didn't have that date because of the gitify workflow), causing elastic search to throw a fit about the format. If we can check for and create/updating mappings before sending data (particularly in the scheduler task to index everything), that should prevent a bunch of issues like this in the future.

Docs: https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-mapping.html

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant