Created
November 19, 2012 23:09
-
-
Save nz/4114708 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'net/http' | |
require 'elastictastic' | |
class Rubygem | |
include Elastictastic::Document | |
field :id, type: 'string' | |
field :version, type: 'string' | |
field :name, type: 'string' | |
end | |
Elastictastic.bulk do | |
rg = Rubygem.new(id: 'rails-1.0.0', name: 'rails', version: '1.0.0') | |
rg.save | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/Users/nick/Desktop/et-error/.bundle/gems/ruby/1.9.1/gems/elastictastic-0.10.4/lib/elastictastic/middleware.rb:75:in `raise_error': input string: "1.0.0" (Elastictastic::ServerError::For) | |
from /Users/nick/Desktop/et-error/.bundle/gems/ruby/1.9.1/gems/elastictastic-0.10.4/lib/elastictastic/middleware.rb:63:in `block in request' | |
from /Users/nick/Desktop/et-error/.bundle/gems/ruby/1.9.1/gems/elastictastic-0.10.4/lib/elastictastic/middleware.rb:57:in `tap' | |
from /Users/nick/Desktop/et-error/.bundle/gems/ruby/1.9.1/gems/elastictastic-0.10.4/lib/elastictastic/middleware.rb:57:in `request' | |
from /Users/nick/Desktop/et-error/.bundle/gems/ruby/1.9.1/gems/elastictastic-0.10.4/lib/elastictastic/transport_methods.rb:14:in `post' | |
from /Users/nick/Desktop/et-error/.bundle/gems/ruby/1.9.1/gems/elastictastic-0.10.4/lib/elastictastic/client.rb:58:in `bulk' | |
from /Users/nick/Desktop/et-error/.bundle/gems/ruby/1.9.1/gems/elastictastic-0.10.4/lib/elastictastic/bulk_persistence_strategy.rb:84:in `flush' | |
from /Users/nick/Desktop/et-error/.bundle/gems/ruby/1.9.1/gems/elastictastic-0.10.4/lib/elastictastic.rb:158:in `bulk' | |
from ./repro.rb:12:in `<main>' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment