Hello everyone. Today I will be talking you through how to fix the search function for Alfresco 4.0d. Out of the box, Alfresco’s search function runs on solr. However, solr doesn’t work properly on Alfresco 4.0d so when you try to search a document Alfresco will come back with no results. To fix this you will need to switch from solr to Lucene which will require a bit of script altering. To do this, follow these steps:
- Stop Alfresco
Before we start editing alfresco’s we first need to turn it off. This will then allow you to edit the files required to setup Lucene. To do this go to your alfresco server and start up the alfresco manager tool. Once in go to the “Manage Application” tab and click the “Stop All” button. This will shutdown alfresco completely.
- Edit the file Alfresco-global.properties
Once alfresco has been stop you’ll need to edit the alfresco-global.properties file. This will be located at: alfresco\tomcat\shared\classes\alfresco-global.properties. This file is responsible for all the base setting for alfresco, including the database. The segment of code that you are looking for is:
### Solr indexing ###
You will need the edit some of this to setup Lucene. You’ll need to replace solr with lucene in the line index.subsystem.name=solr, hash tag out the lines dir.keystore=$(dir.root)/keystroke and solr.port.ssl=8444. You will also need to add in index.recovery.mode=FULL. This will re-build the index so that lucene will work. This is what you’ll need to change it to:
### Solr/lucene indexing ###
Once that is done, save the file and start up alfresco so that the index can be re-built.
- Stop Alfresco, edit alfresco-global and delete some folders and files
Once the index has been re-built you’ll need to stop alfresco to do more editing. First things first, get alfresco-global.properties open and go to the section we edited in the last step. You’ll need to change the index.recovery.mode to the following:
Once that is done you need to delete the following folders and files:
Once those folders and file have been deleted you can start up Alfresco again with Lucene in place of solr. The search function should now work.
Thank you for reading.