0

I have model ShopItem
I'm using sunspot and solr.
At development I use sunspot_solr gem, in production I configured server with this manual: http://www.arborisoft.com/how-to-install-multicore-apache-solr-4-7-on-debian-7/

Here is what I get at ptoduction, in dev everything is OK
Some logs, which are unnecessary now

My ShopItem model

  searchable do
    text :title, boost: 3.0
    # ColorShopItem
    text :colors, boost: 2.0 do
      colors.map {|c| [c.color.title, c.color.hex] }
    end
    text :materials, boost: 2.0 do
      request_parameter.materials
    end
    text :country, boost: 1.0 do
      request_parameter.address.try(:country).try(:title)
    end
    text :state, boost: 1.0 do
      request_parameter.address.try(:state)
    end
    text :city, boost: 1.0 do
      request_parameter.address.try(:city)
    end
    boolean :published
  end

UPD: Promblems were in that /opt/solr/staging/multicore/staging/conf/schema.xml wasn't updated with bundle exec rake sunspot:solr:reindex
So there is another question: How to update this file using this command?

Alex Tonkonozhenko
  • 1,514
  • 12
  • 26
  • `RAILS_ENV=staging bundle exec rake sunspot:solr:reindex`? – zrl3dx Apr 15 '14 at 19:49
  • Not working. Maybe there are problems with rights, but I work as root(I know it's bad, but it's staging) – Alex Tonkonozhenko Apr 15 '14 at 19:53
  • I don't remember how solr works (used it last time long time ago), but does it modifiys schema.xml? See: http://stackoverflow.com/questions/7195894/how-does-sunspot-modify-solrs-schema-xml-does-it-modify-it-at-all – zrl3dx Apr 15 '14 at 19:59

0 Answers0