We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
output { elasticsearch { ... script => " if(ctx.op == 'create') { ctx._source=params.event; ctx._source.first_create_time = params.event.get('@timestamp'); } else { String old = ctx._source.get('first_create_time'); ctx._source = params.event; ctx._source.last_update_time = params.event.get('@timestamp'); ctx._source.first_create_time = old; } " } }
ctx._source = params.event; 会把原文档内容都覆盖掉,包括 @Version 信息。port、subdomain等索引里生成的org、parsed-domain信息也会丢失。
ctx._source = params.event;
这样在pipeline执行时,可能会影响性能,因为操作的记录数会变多。
The text was updated successfully, but these errors were encountered:
fix: override source document
37dc582
#40
改成
for (entry in params.event.entrySet()) { ctx._source[entry.getKey()] = entry.getValue() }
Sorry, something went wrong.
No branches or pull requests
背景
ctx._source = params.event;
会把原文档内容都覆盖掉,包括 @Version 信息。port、subdomain等索引里生成的org、parsed-domain信息也会丢失。这样在pipeline执行时,可能会影响性能,因为操作的记录数会变多。
The text was updated successfully, but these errors were encountered: