Skip to content

Commit a8d9ffd

Browse files
davidszottenhonzakral
authored andcommitted
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
1 parent 72f661f commit a8d9ffd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Example Usage
4646
doc = {
4747
'author': 'kimchy',
4848
'text': 'Elasticsearch: cool. bonsai cool.',
49-
'timestamp': datetime(2010, 10, 10, 10, 10, 10)
49+
'timestamp': datetime.now(),
5050
}
5151
res = es.index(index="test-index", doc_type='tweet', id=1, body=doc)
5252
print(res['created'])

0 commit comments

Comments
 (0)