Setting Solr from the start

5. December 2016

This article is more a note to myself 🙂

Here’s how to install solr:

  1. https://www.digitalocean.com/community/tutorials/how-to-install-solr-5-2-1-on-ubuntu-14-04
    1. Make sure you have Java (java -ver), install ppa, python, everything.
    2. download the correct version (ie. solr-6.3.0.tar.gz using wget)
    3. instead of tar xf all, only tar the installation and run the script
      (tar xzf solr-5.2.1.tgz solr-5.2.1/bin/install_solr_service.sh –strip-components=2,
      sudo bash ./install_solr_service.sh solr-5.2.1.tgz)
  2. Copy conf from /opt/solr/server/solr/configsets/basic_config/conf to /var/data/new_core -> you need to make the new core folder first.
  3. Easy way is then go to localhost:8983/solr/# etc and add core there – or using command line (also in the link up top)

Done!

Now still need to get reindex with mongo and sunspot functioning… 

Update 10.12.2016

New Solr 6.3 vs. Sunspot with Solr 4.3

THe field types are all wrong in solrconfig.xml. First, you need to get schema.xml from the solr setting from sunspot and rename it to managed-schema (without extension).

Then, solrconfig.xml from basic_configs need to be edited, so booleans changed to boolean, tdoubles to tdouble etc. All “s”s need to be removed. Then it would work with Rails.

I hope this knowledge help me or someone in the future! 🙂