Treat text fields as string and try beta Kibana image
This commit is contained in:
6
db.py
6
db.py
@@ -60,7 +60,7 @@ def store_message(msg):
|
||||
del msg[key]
|
||||
if key in schema:
|
||||
if isinstance(value, int):
|
||||
if schema[key].startswith("string"):
|
||||
if schema[key].startswith("string") or schema[key].startswith("text"):
|
||||
msg[key] = str(value)
|
||||
|
||||
body = [{"insert": {"index": index, "doc": msg}}]
|
||||
@@ -108,7 +108,9 @@ def store_message_bulk(data):
|
||||
del msg[key]
|
||||
if key in schema:
|
||||
if isinstance(value, int):
|
||||
if schema[key].startswith("string"):
|
||||
if schema[key].startswith("string") or schema[key].startswith(
|
||||
"text"
|
||||
):
|
||||
msg[key] = str(value)
|
||||
|
||||
body = {"insert": {"index": index, "doc": msg}}
|
||||
|
||||
Reference in New Issue
Block a user