Homec4science

Ensure dateCreated property exists at index creation time

Authored by Chad Horohoe <chadh@wikimedia.org> on Dec 30 2014, 11:46.

Description

Ensure dateCreated property exists at index creation time

Summary:
Since the default query will sort on this when no query string is
attached we want to make sure the property at least exists.

Otherwise Elasticsearch yells at you: "No mapping found for [dateCreated]
in order to sort on" when you try to search for documents that haven't
been indexed yet.

Test Plan:
Searched for Mocks and Initiatives (no such documents exist in my index)
and got the error. After patching and reinitializing the index, the error
during querying went away.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D11056

Details

Committed
epriestley <git@epriestley.com>Dec 30 2014, 11:46
Pushed
aubortJan 31 2017, 17:16
Parents
rPHc8d707caa05d: Improve `pygments.enabled` discussion
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH9374ace60248: Ensure dateCreated property exists at index creation time (authored by Chad Horohoe <chadh@wikimedia.org>).Dec 30 2014, 11:46