You are here

Alfresco 4.0d: How to fix the search function

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:

  1. 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.
  2. 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 ###
    index.subsystem.name=solr
    dir.keystore=/keystore
    solr.port.ssl=8444

    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 ###
    index.subsystem.name=lucene
    index.recovery.mode=FULL
    #dir.keystore=/keystore
    #solr.port.ssl=8443

    Once that is done, save the file and start up alfresco so that the index can be re-built.

  3. 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:

    index.recovery.mode=AUTO

    Once that is done you need to delete the following folders and files:

    • Alfresco\ald_data\solr
    • Alfresco\tomcat\conf\Catalina\localhost\solr.xml
    • Alfresco\tomcat\webapps\solr

    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.

About IQ in IT

IQ in IT is a cloud service provider based in Kingston Upon Thames. We offer a complete solution of cloud services including phones, virtual desktops and servers to our clients.

Keep In Touch

  •   info (@) iqin.it
  •   0208 1668716
  •   Vine House, 143 London Road, Kingston Upon Thames, Surrey, KT2 6NH