Skip to content

7. Installing and Configuring Solr (for development only!)

rebmizrahi edited this page Apr 8, 2024 · 1 revision

Install Solr

$ brew install solr

Start Solr with a port ID

solr start -p 8983

Create a core named simssadb

$ solr create_core -c simssadb -V

Change it so it does not auto create fields

$ solr config -c simssadb -p 8983 -property update.autoCreateFields -value false

Inside your /usr/local/Cellar/solr/7.3.1/server/solr/simssadb/conf folder create an elevate.xml file that has nothing other than the tags (Solr needs this for some reason):

echo "<elevate></elevate>" >> elevate.xml

Add the following line to your solrconfig.xml (it's in the same folder as the file above) file within the config tag:

<requestHandler name="/mlt" class="solr.MoreLikeThisHandler" />

Inside your Python Virtual Environment:

$ python manage.py build_solr_schema --configure-directory=/usr/local/Cellar/solr/7.3.1/server/solr/simssadb/conf --reload-core http://127.0.0.1:8983/solr/simssadb

Rebuild the indexes:

$ python manage.py rebuild_index

Clone this wiki locally