Hey,
I am using the low level library in python to query all documents with a specific timestamp and want to add a new field to this documents with "script". However I cannot get it working. I just get the error:
SyntaxError: non-keyword arg after keyword arg
enrich_scan = scan(es, index='logstash-*', doc_type='etc',
{"script" :{"source": "ctx._source.dns_alias = dns['_source']['dns_alias']"}
},
query={"query" :
{"bool" :
{"must" :
{"match" :
{ "@timestamp" : dns['_source']['@timestamp'] }
},
"must" :
{"match" :
{ "asset" : dns['_source']['asset'] }
}
}
}
}
)