fixed shard creations
This commit is contained in:
parent
7f0d8a7dda
commit
c6dc0a797b
4 changed files with 5 additions and 4 deletions
|
@ -43,6 +43,7 @@ class Elastic_Testing(DB_Testing):
|
|||
driver.indices.delete(index=INDEX)
|
||||
|
||||
def add_bulk(self, driver: Elasticsearch):
|
||||
self.create_table(driver)
|
||||
for i in range(0, len(self.bulk_data), 1000):
|
||||
driver.bulk(index=INDEX, operations = '\n'.join(self.bulk_data[i:i+1000]), refresh=True)
|
||||
|
||||
|
|
4
main.py
4
main.py
|
@ -22,8 +22,8 @@ def test_psql():
|
|||
|
||||
def test_elasticsearch(shards = 1):
|
||||
es = Elasticsearch(
|
||||
'https://127.0.0.1:9200',
|
||||
api_key='RVAzeHpvOEJXTnUzZ2RiTkdWX2Q6TksySHBfaEFSWktoQmNPOFFSbm1DUQ==',
|
||||
'http://docker.tma.coe.int:9200',
|
||||
api_key='YVE1VDA0OEI3c28wRGJYTUZkLW46OWFYSUQtQVhUcGVvTmlKdUtmS29Wdw==',
|
||||
verify_certs=False, # just to not create certificates
|
||||
ssl_show_warn=False
|
||||
)
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 73 KiB After Width: | Height: | Size: 71 KiB |
|
@ -26,7 +26,7 @@ def time_func(name: str, function_name: str, x : Callable, repeat : Optional[int
|
|||
|
||||
|
||||
def preprocess_json():
|
||||
for x in range(0, 1):
|
||||
for x in range(0, 10):
|
||||
with open('data.json', 'r') as f:
|
||||
data : dict = json.load(f)
|
||||
for d in data:
|
||||
|
|
Loading…
Reference in a new issue