Liking cljdoc? Tell your friends :D

Solr and Corona Installation

Prerequisites

1. Install Solr

2. set SOLR_HOME env var to point to solr home dir

For this library to work properly, you need to set SOLR_HOME var pointing to solr home folder you just installed.

For MAC users: You can put the following in your ~/.bash_profile file source ./.profile Then, put the following in your ~/.profile file

#Solr
export SOLR_HOME="$HOME/solr-8.0.0" # put right version here
export SOLR_ULIMIT_CHECKS=false

For Emacs users:

  • MAC users: you may need to add setenv SOLR_HOME /my/path/to/solr/home to your /etc/launchd.conf file
  • or install [exec-path-from-shell](https://github.com/purcell/exec-path-from-shell package allowing you to read env variables from emacs GUI
  • or simply put these in your init.el:
(setenv "SOLR_HOME" "/my/path/to/solr/home")
(setenv "SOLR_ULIMIT_CHECKS" "false")

3. Add corona library in project.clj

Clojars Project

4. Add Solr resources to your project

You can either:

NOTE: If you start from existing example, make sure, in your $CLJ_PROJECT_HOME/resources/solr/<core-name>/conf/solrconfig.xml file contains right maching lucene version <luceneMatchVersion>8.0.0</luceneMatchVersion>

5. Test solr

From command line

From clojure

For development, you can start solr from Clojure repl.

  • make sure you are seeing SOLR_HOME variable. (System/getenv "SOLR_HOME")

  • then:

(require '[corona.cmd :as cmd])
(cmd/exec! :start) ;; $SOLR_HOME/bin/solr start

Can you improve this documentation?Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close