I want to update the index whenever any of any of the tables used in the join to create the index is updated in MySQL. I'm using jdbc input plugin. So, if I concat all the related modified_time, how can I compare those with the sql_last_value as that will be a string of dates?
I think this is mainly a SQL question, so am not sure I am qualified to answer. Could you perhaps create a view and have a column in the view that is the MAX of all modified dates included in the join? If that doesn't work, you could compare against multiple fields in the query.
I used the GREATEST() function in my MySQL join query over all the modified_time fields so now if I change any data in any of the tables participating in join then that data gets indexed in the ElasticSearch.
PS: I'm having triggers on all of my tables for creation & modification time
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.