Comments (5)
Thanks for the question. There's a good chance that the ES options have changed over time, this repo probably hasn't caught up with how things are done these days.
from elasticsearch-test-data.
It works fine on old ES (tried 5.5 first). On the new ES (7.2), with the index not being there, so it should create a new one, the output is (added printing the HTTP Error exception, hence HTTP 400):
[I 210603 11:33:30 es_test_data:55] Trying to create index http://localhost:9200/test_data
HTTP 400: Bad Request
[I 210603 11:33:30 es_test_data:61] Looks like the index exists already
from elasticsearch-test-data.
The refresh option is not available in ES 7 and the scheme require new index field.
diff --git a/es_test_data.py b/es_test_data.py
index 403d3f2..294ac20 100755
--- a/es_test_data.py
+++ b/es_test_data.py
@@ -43,10 +43,11 @@ def delete_index(idx_name):
def create_index(idx_name):
schema = {
"settings": {
- "number_of_shards": tornado.options.options.num_of_shards,
- "number_of_replicas": tornado.options.options.num_of_replicas
- },
- "refresh": True
+ "index": {
+ "number_of_shards": tornado.options.options.num_of_shards,
+ "number_of_replicas": tornado.options.options.num_of_replicas
+ }
+ }
}
body = json.dumps(schema)
from elasticsearch-test-data.
That's a great find @tuapuikia - could you open a PR?
from elasticsearch-test-data.
@tuapuikia According to the reference of Create index API, the index field is optional for both 6.x and 7.x version.
from elasticsearch-test-data.
Related Issues (17)
- Delete index not working HOT 1
- seems like that the u cant spec field names with a '.'
- RuntimeError at newer tornado versions HOT 1
- Command line parameter not being used. HOT 15
- New feature requests
- RuntimeError: Cannot run the event loop while another loop is running HOT 1
- RuntimeError: Cannot run the event loop while another loop is running HOT 3
- Added a Dockerfile HOT 2
- Cannot find teh way how to use the validate_cert option...
- Request Enhancements for better performance and stress testing. HOT 4
- Upload: FAILED HOT 2
- can't connect to es HOT 2
- generate failed HOT 2
- upload failed, error: stream closed
- Error with default options against local cluster HOT 2
- Add validate_cert option to command line to allow using insecure https endpoint HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elasticsearch-test-data.