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

Notes:

...
;; BEGIN exec-path-from-shell
(use-package exec-path-from-shell
 :ensure t
 :if (memq window-system '(mac ns x))
 :config (setq exec-path-from-shell-variables '("PATH" "SOLR_HOME"))
 (exec-path-from-shell-initialize))
;; END exec-path-from-shell
(require 'server)
(unless (server-running-p) (server-start)))

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