oliver006 / elasticsearch-test-data

Generate and upload test data to Elasticsearch for performance and load testing
MIT License
257 stars 124 forks source link

seems like that the u cant spec field names with a '.' #14

Closed elonderin closed 3 years ago

elonderin commented 5 years ago

seems like that the u cant spec field names with a '.'

eg:

$ ... '--format=sourceSystem:text,sourceSystemCustomerId:text,tenant:text,firstName:text,lastName:text,email.address'

[I 190521 14:58:02 es_test_data:46] Trying to create index ......
[I 190521 14:58:02 es_test_data:51] Looks like the index exists already
[I 190521 14:58:02 es_test_data:220] Generating 1 docs, upload batch size is 1000
Traceback (most recent call last):
  File "es_test_data.py", line 276, in <module>
    tornado.ioloop.IOLoop.instance().run_sync(generate_test_data)
  File "/home/ubuntu/.local/lib/python2.7/site-packages/tornado/ioloop.py", line 576, in run_sync
    return future_cell[0].result()
  File "/home/ubuntu/.local/lib/python2.7/site-packages/tornado/concurrent.py", line 261, in result
    raise_exc_info(self._exc_info)
  File "/home/ubuntu/.local/lib/python2.7/site-packages/tornado/gen.py", line 326, in wrapper
    yielded = next(result)
  File "es_test_data.py", line 223, in generate_test_data
    item = generate_random_doc(format)
  File "es_test_data.py", line 155, in generate_random_doc
    f_key, f_val = get_data_for_format(f)
  File "es_test_data.py", line 81, in get_data_for_format
    field_type = split_f[1]
IndexError: list index out of range

while this works

$ ... '--format=sourceSystem:text,sourceSystemCustomerId:text,tenant:text,firstName:text,lastName:text'