public
Created

  • Download Gist
gistfile1.txt
1 2 3 4 5 6 7 8 9 10 11 12
ree-1.8.7-2010.02 :001 > res = Team.search { keywords "Mets" }
=> <Sunspot::Search:{:defType=>"dismax", :q=>"Mets", :rows=>30, :start=>0,
:fl=>"* score", :qf=>"name_text", :fq=>["type:Team"]}>
ree-1.8.7-2010.02 :002 > res.results
=> [#<Team _id: BSON::ObjectId('4dfa2262508c319700000001'), name: "Mets">]
ree-1.8.7-2010.02 :003 > Team.reindex(:batch_size => false)
=> {"responseHeader"=>{"QTime"=>137, "status"=>0}}
ree-1.8.7-2010.02 :004 > res = Team.search { keywords "Mets" }
=> <Sunspot::Search:{:defType=>"dismax", :q=>"Mets", :rows=>30, :start=>0,
:fl=>"* score", :qf=>"name_text", :fq=>["type:Team"]}>
ree-1.8.7-2010.02 :005 > res.results
=> []

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.