Setting Solr from the start
This article is more a note to myself 🙂
Here’s how to install solr:
- Make sure you have Java (java -ver), install ppa, python, everything.
- download the correct version (ie. solr-6.3.0.tar.gz using wget)
- 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)
- 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.
- Easy way is then go to localhost:8983/solr/# etc and add core there – or using command line (also in the link up top)
Now still need to get reindex with mongo and sunspot functioning…
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! 🙂