If you have an error like this: ERROR: Error CREATEing SolrCore ‘nextant’: Unable to create core [nextant] Caused by: /var/solr/data/nextant/data you will need to delete your core and try again using the code below:

$ sudo /opt/solr/bin/solr delete -c nextant

After the setup complete, you will need to initiate the first indexing of your files (first, change into the directory where nextcloud is installed):

Solr will needs memory when you start indexing/querying a descent number of documents, you can increase the allocated pool of memory (default is 512 MB):

edit ‘/etc/default/solr.in.sh’

$ sudo nano /etc/default/solr.in.sh

Ctrl+W and enter ‘solr_heap’ to find the line and change to:

SOLR_HEAP="2048m"

Ctrl+X, then ‘Y’ to save and exit.

Still didn’t work, solr crashed again. Then set the index to run in debug mode:

$ sudo -u www-data php ./occ nextant:index --debug

When solr crashed this time, I was able to see which file during the extracting process was the culprit. In my case, it was a tiddlywiki .html file but it turns out I had to eliminate the entire folder from being indexed.

1. In Nextcloud, go into the folder that you want to exclude from the index. 2. Then click the ‘+’ plus sign to add a text file but instead of a text file, create a file with the name ‘.noindex’. This will exclude the folder from Nextant indexing.

After excluding the file with all tiddlywiki .html files, I re-ran the index command and everything ran OK.

When this is done, you have enabled a full-text search within your own files and shared document of your cloud.

The code below produces errors

Optionally, for remote access to the webadmin of your Solr; we will generate a htpasswd file to store your login and password (using ‘admin’ as the login_:

$ sudo htpasswd -c /etc/apache2/htpasswd-solr admin

edit the file below:

$ sudo nano /etc/apache2/sites-enabled/nextcloud.conf

add this to your current configuration (inside the <Directory:> </Directory>):