[英]elasticsearch logstash delete when does not exist in input
我有一個 elasticsearch 數據庫,如果輸入語句中不存在,我想刪除所有文檔? 你能幫我嗎,
提前致謝
input {
jdbc {
jdbc_validate_connection => true
jdbc_connection_string => "jdbc:postgresql://xxxx:xxxx/xxxx"
jdbc_user => "xxxx"
jdbc_password => "xxxx"
jdbc_driver_library => "/usr/share/logstash/Drivers/postgres/postgresql-9.4.1212.jar"
jdbc_driver_class => "org.postgresql.Driver"
statement => "SELECT acso.usagers.id as id FROM acso.usagers WHERE acso.usagers.date_suppression is null"
tags => ["idUsagers"]
}} filter {}output {
elasticsearch {
action => delete
index => "usagers"
document_type => "atms"
doc_as_upsert => true
document_id => "%{id}"
hosts => "xxxxxx.example.org"}}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.