MOPED:
127.0.0.1:27017 COMMAND database=text command={:text=>{:search=>"cat"}} (4.4558ms)
Moped::Errors::OperationFailure: The operation: #<Moped::Protocol::Command
@length=70
@request_id=15
@response_to=0
@op_code=2004
@flags=[:slave_ok]
@full_collection_name="text.$cmd"
@skip=0
@limit=-1
@selector={:text=>{:search=>"cat"}}
@fields=nil>
failed with error 13111: "exception: wrong type for field (text) 3 != 2"
the model
class A
include Mongoid::Document
field(:title)
field(:text)
index(
{:title => 'text', :text => 'text'},
{:weights => { :title => 10 }}
)
end
in the console i've run
a:~/git/dojo4/rails_app_m $ rake db:mongoid:create_indexes|head
MONGOID: Created indexes on A:
MONGOID: Index: {:title=>"text", :text=>"text"}, Options: {:weights=>{:title=>10}}
....
any thoughts?