Low level elasticsearch library for ruby (work in progress)
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
spec
.gitignore
Gemfile
README.md
Rakefile
chewy.gemspec

README.md

Chewy

connection = Chewy::Connection.new "http://localhost:9200"

products = connection.expand("myproject", "products") # http://localhost:9200/myproject/products

product = products.expand(1) # http://localhost:9200/myproject/products/1

product.with(:fields => ["title", "content"]).get # GET http://localhost:9200/myproject/products?fields=title,content

product.get # GET http://localhost:9200/myproject/products

# setting request body (JSON)

product.put :title => "How to Train Your Lolcat"

product.put do
  set :title, "How to Train Your Lolcat"
end