Create an Apache Solr index

2585 views March 9, 2017 July 13, 2019 admin 3

WPSOLR >= 19.1

With the release of WPSOLR 19.1, this guide is no use anymore. You can directly go to the next step.

The creation of a Solr index now takes:

  • 10 seconds with SolrCloud: fully automatic process from the plugin admin.
    No need anymore to download WPSOLR config files, upload them as config sets to zookeeper, or to create manually a collection. This is done in one click in the plugin UI.
  • 1 minute with Apache Solr: semi-automatic process from the plugin admin.
    The plugin will give you the system commands to execute on your Solr server filesystem to download WPSOLR config files, copy them as config sets. No need to create the core index, the plugin will also take care of it.

Just compare to the tedious manual procedures described below.

WPSOLR < 19.1

(If your index is hosted at Gotosolr, please follow the dedicated tutorial)

This procedure was last tested on Apache Solr 6.6.0

(Solr 6.5 may not display suggestions, due to a Solr bug. See ticket).

We will suppose here that you already installed your Apache Solr server 5.x.x / 6.x.x, and downloaded our Apache Solr configuration files specially designed for WPSOLR.

Create a blank index named “new-index”

Use a command like:

solr-6.x.x/bin/solr create -c new-index
Command line to create a solr index

Command line to create a solr index

 

Download Apache Solr configuration files 

Download link is here.

Download Apache Solr 5/6 configuration files to create your index

Download Apache Solr 5/6 configuration files to create your index

 

Unzip Apache Solr configuration files 

 

Copy Apache Solr configuration files to your index /conf directory 

cp elevate.xml schema.xml solrconfig.xml stopwords.txt solr-6.1.0/server/solr/new-index/conf/
Copy the WPSOLR Solr configuration files to the new index /conf directory

Copy the WPSOLR Solr configuration files to the new index /conf directory

Edit your solrconfig.xml file to change the lucene version 

Change the lucene version to your lucene version.

Change solrconfig.xml lucene version with your current version

Change solrconfig.xml lucene version with your current version

 

Reload your index or restart Apache Solr 

This is necessary to get your index start using the configuration files.

Reload your Solr index after updating it's configuration files

Reload your Solr index after updating it’s configuration files

 

Errors and warnings during the index reload 

Exception in reloading spell check index for spellchecker: suggest

This error appears when the index is reloaded for the first time, then disappears. Solr is trying to load the spellcheck index data file, before it’s created.

 

default search field in schema is text. WARNING: Deprecated,&#8203; please use 'df' on request instead.

The old syntax is kept in schema.xml, until it’s no more accepted by Apache Solr.

 

query parser default operator is OR. WARNING: Deprecated, please use 'q.op' on request instead.

The old syntax is kept in schema.xml, until it’s no more accepted by Apache Solr.

Was this helpful?

Join Our weekly Newsletter

Receive our latest news once a week, each Thursday afternoon.
Your email is kept 100% private, and you will not receive other stuff in your mailbox.

We keep your data private and share your data only with third parties that make this service possible. Read our Privacy Policy.