Example code on the documentation page does not work
See original GitHub issueHey,
I have tried the example code with Elasticsearch 1.4.0 and ElasticSearch 1.5.2. And I am getting errors:
>>> from datetime import datetime
>>> from elasticsearch import Elasticsearch
>>> doc = {
... 'author': 'kimchy',
... 'text': 'Elasticsearch: cool. bonsai cool.',
... 'timestamp': datetime.now(),
... }
>>> es= Elasticsearch(hosts=['localhost:9200'])
>>> es
<Elasticsearch([{u'host': u'localhost', u'port': 9200}])>
>>> res = es.index(index="test-index", doc_type='tweet', id=1, body=doc)
Traceback (most recent call last):
...
raise HTTP_EXCEPTIONS.get(status_code, TransportError)(status_code, error_message, additional_info)
elasticsearch.exceptions.NotFoundError: TransportError(404, u'IndexMissingException[[test-index] missing]')
What else is needed to get it run?
Issue Analytics
- State:
- Created 8 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Unable to generate DocC documentation - Apple Developer
Even the sample Apple SlothCreator package example does not work. I am using the latest ship Xcode (13.2.1), and I downloaded the sample...
Read more >freeCodeCamp: TECHNICAL DOCUMENTATION PAGE
Free Discord Group: https://www.dorscodingschool.com/discord▻ Get the solution to these problems and an eBook on 'How to Become a ...
Read more >How to Write Doc Comments for the Javadoc Tool - Oracle
This document describes the style guide, tag and image conventions we use in documentation comments for Java programs written at Java Software, Oracle....
Read more >Recommended XML tags for C# documentation comments
This article provides the syntax and definitions for recommended tags for XML documentation.
Read more >Documentation for Visual Studio Code
Visual Studio Code is a lightweight but powerful source code editor which runs on your desktop and is available for Windows, macOS and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Inserting this line before it gets it working:
Thanks again! I will check dsl out.