Guest User

Untitled

a guest
Nov 7th, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. input {
  2. jdbc {
  3. jdbc_driver_library => "mysql-connector-java-5.0.8/mysql-connector-java-5.0.8-bin.jar"
  4. jdbc_driver_class => "com.mysql.jdbc.Driver"
  5. jdbc_connection_string => "jdbc:mysql://localhost:3306/MyDB"
  6. jdbc_user => "user"
  7. jdbc_password => "pass"
  8. schedule => "* * * * *"
  9. type => "product"
  10. 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"
  11. }
  12. }
  13.  
  14. use Search::Elasticsearch;
  15. my $es = Search::Elasticsearch->new();
  16. $search_results = $es->search( size => 10,
  17. body => {
  18. query => { "match" => { "_all" => "car" }
  19. }} )->{hits}->{hits};
Add Comment
Please, Sign In to add comment