From a8d9ffd60b3782e5c8e8cc06f25debd68ca07672 Mon Sep 17 00:00:00 2001 From: David Szotten Date: Wed, 24 Jun 2015 09:55:23 +0100 Subject: [PATCH] use now() instead of fixed time took me a few minutes to figure out why the doc i just added didn't show up in kibana. a more recent timestamp may be friendlier for beginners --- docs/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.rst b/docs/index.rst index b768c3d9..dc4e8cf6 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -46,7 +46,7 @@ Example Usage doc = { 'author': 'kimchy', 'text': 'Elasticsearch: cool. bonsai cool.', - 'timestamp': datetime(2010, 10, 10, 10, 10, 10) + 'timestamp': datetime.now(), } res = es.index(index="test-index", doc_type='tweet', id=1, body=doc) print(res['created'])