Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
Help us understand the problem. What is going on with this article?

elasticsearch-railsで任意のリクエストを送れるperform_requestメソッドが便利

More than 5 years have passed since last update.
Blog::Post.__elasticsearch__.client.perform_request(:get, 'blog-posts/_count').body
=> {"count"=>2, "_shards"=>{"total"=>5, "successful"=>5, "failed"=>0}}

という感じで任意のHTTPリクエストを送れる便利メソッドです。

詳しくは元記事で:elasticsearch-railsで任意のリクエストを送れるperform_requestメソッドが便利

haracane
エクサウィザーズでTLやってます。興味分野はKotlin, Rails, Elasticsearch, Hadoopなど。
http://blog.enogineer.com
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away