Sunspot (websolr) won't index!

46 views
Skip to first unread message

Sarah

unread,
May 27, 2012, 3:41:15 PM5/27/12
to ruby-s...@googlegroups.com
I just changed my searchable do blocks and now I can't get any indexing to happen. I'm using websolr on Heroku

This is my output when I run >> heroku run rake sunspot:reindex

[2012-05-27 19:30:20 +0000] Start Indexing
[2012-05-27 19:30:21 +0000] Completed Indexing. Rows indexed 0. Rows/sec: 237.6050814412801 (Elapsed: 0.21043321 sec.)
[2012-05-27 19:30:21 +0000] Start Indexing
[2012-05-27 19:30:21 +0000] Completed Indexing. Rows indexed 0. Rows/sec: 409.4950803629591 (Elapsed: 0.122101589 sec.)
[2012-05-27 19:30:21 +0000] Start Indexing
[2012-05-27 19:30:21 +0000] Completed Indexing. Rows indexed 0. Rows/sec: 2066.73059753315 (Elapsed: 0.0241928 sec.)

Here are my searchable do blocks in my models:

Blog_Post:

searchable do   
    text :body, :boost =>3
    text :title, :boost => 8
    text :source_title, :boost => 6
    text :source, :boost =>  5             
    text :blog_link, :boost => 3
    boolean :is_our_blog
  end


Organization:

searchable do
  text :name, :boost =>9
  text :business_model , :boost =>5
  text :program_costs_includes , :boost =>5
end


Program:

searchable do
  text :name, :boost =>8
  text :location, :boost =>8
  text :subject, :boost =>8
  text :organization_name, :boost =>9
  integer :weekly_cost
  integer :group_size
  text :length, :boost =>3  
end


Thanks in advance for any help!
Sarah
 

Nick Zadrozny

unread,
May 28, 2012, 3:43:19 AM5/28/12
to ruby-s...@googlegroups.com
"Rows indexed 0" sure sounds like there aren't any objects to index in your production database. At least, none that Sunspot was able to find. Not that that's much of a qualifier, since your setup seems to be pretty simple.

If I were doing some basic debugging, I might start with "heroku run rails console" to double-check "Program.count" or something similar. All the code paths here are pretty straightforward, so perhaps there is just something silly going on here…

--
Nick Zadrozny

http://websolr.com — hassle-free hosted search, powered by Apache Solr

Reply all
Reply to author
Forward
0 new messages