Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- input {
- jdbc {
- jdbc_driver_library => "mysql-connector-java-5.0.8/mysql-connector-java-5.0.8-bin.jar"
- jdbc_driver_class => "com.mysql.jdbc.Driver"
- jdbc_connection_string => "jdbc:mysql://localhost:3306/MyDB"
- jdbc_user => "user"
- jdbc_password => "pass"
- schedule => "* * * * *"
- type => "product"
- statement => "SELECT category.category_id, category.name AS product_category, category.product_id AS product_category_id, product.product_id, product.name AS product_name, product.price AS product_price FROM category JOIN product ON category.product_id = product.product_id"
- }
- }
- use Search::Elasticsearch;
- my $es = Search::Elasticsearch->new();
- $search_results = $es->search( size => 10,
- body => {
- query => { "match" => { "_all" => "car" }
- }} )->{hits}->{hits};
Add Comment
Please, Sign In to add comment