Update elastic search document

Hi,
I have create following conf file

input {
    jdbc {
        jdbc_driver_library => "/usr/share/java/mysql.jar"
        jdbc_driver_class => "com.mysql.jdbc.Driver"
        jdbc_connection_string => "jdbc:mysql://localhost:3309/v4qadb"
        jdbc_user => "v4qashop"
        jdbc_password => "V4admin09&#!"
        jdbc_paging_enabled => true
        jdbc_page_size => 10000
        tracking_column => "pro_updated_date"
        use_column_value=>true
        # statement => "select * from `es_product_detail_info` where `pro_updated_date` >=:sql_last_value"
        schedule => "*/10 * * * *"
        statement => "SELECT
        `item_id`,`product_id`,`item_color_id`,`item_size_id`,`item_sku`,`item_image`,`item_price`,`brand_id`,`control_number`,`description`,
        `display_product_color_id`,`item_details`,`item_name`,`gender`,`pro_updated_date` ,`shopify_product_id`,`image_product_name`,`image_sort_order`,
        `image_title`,`image_id`,`updated_at`,`document_id`,`item_color_image`,`item_v4_size_title`,`cat_name`,`cat_shopify_collection_id`
        from es_product_info where `pro_updated_date` >=:sql_last_value"
    }
}
output {
    elasticsearch {
        document_id=> "%{document_id}"
        document_type => "doc"
        index => "product_detail_info"
        hosts => ["http://localhost:9200"]
    }
    stdout{
        codec => rubydebug
    }
}

My tracking column is base on date. My question is if I change any thing in mysql table and also update "pro_updated_date" to current date it should update document right ?

If not then how I can achieve this ? And I want to update on real time.My logstash running in background.

Should I have to create separate conf file for update ?

Thanks in Advance.

Guys I need your help. How we change logstash timestamp so that it matches my server ?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.