2
votes

I accidentally deleted the solr4.xml file located inside tomcat/conf/Catalina/localhost and since then solr stopped working. I tried many methods like restoring solr4.xml file , solr4 full reindexing, generating new keystore but still it doesnt work.

Please suggest how can i fix my broken solr4 without new fresh installation of alfresco.

2
May be your tomcat/webapps/solr4.war is not exploded properly. Try correctly configuring solr4.xml, delete solr4 folder in tomcat/webapps/ and restart tomcat. - Ujjwal
Woops. I guess you don't have a back up? If you've replaced it then it should be working fine after a reindex, I guess something else is missing/misconfigured. Can you give us any errors from the logs? - Mardoz
for 5.XX community should work that docs.alfresco.com/5.1/tasks/solr-reindex.html - xxxvodnikxxx

2 Answers

1
votes
  1. Confirm the location of the Solr 4 core directories for archive-SpacesStore and workspace-SpacesStore cores. This can be determined from the solrcore.properties file for both the cores. By default, the solrcore.propertiesfile can be found at /solr4/workspace-SpacesStore/conf or /solr4/archive-SpacesStore/conf. The Solr 4 core location is defined in the solrcore.properties file as: For Solr 4, the default data.dir.root path is:

    data.dir.root=/alf_data/solr4/indexes/

  2. Shut down Alfresco (all nodes, if clustered).

  3. Shut down Solr 4 (if running on a separate application server). Delete the contents of the index data directories for each Solr core at ${data.dir.root}/${data.dir.store}.

/alf_data/solr4/index/workspace/SpacesStore

/alf_data/solr4/index/archive/SpacesStore

Delete all the Alfresco models for each Solr 4 core at ${data.dir.root}. /alf_data/solr4/model

  1. Delete the contents of the /alf_data/solr4/content directory.
  2. Start up the application server that runs Solr 4.
  3. Start up the Alfresco application server (if not same as Solr 4 application server).
  4. Monitor the application server logs for Solr. You will get the following warning messages on bootstrap:

WARNING: [alfresco] Solr index directory '/alf_data/solr/workspace/SpacesStore/index' doesn't exist. Creating new index... 09-May-2012 09:23:42 org.apache.solr.handler.component.SpellCheckComponent inform WARNING: No queryConverter defined, using default converter 09-May-2012 09:23:42 org.apache.solr.core.SolrCore initIndex WARNING: [archive] Solr index directory '/alf_data/solr/archive/SpacesStore/index' doesn't exist. Creating new index...

  1. Use the Solr 4 administration console to check the health of the Solr 4 index.
1
votes

You can follow the procedure reported here: http://docs.alfresco.com/5.0/tasks/solr-reindex.html

  • Shut down Alfresco (all nodes, if clustered).
  • Shut down Solr 4 (if running on a separate application server).
  • Delete the contents of the index data directories for each Solr core at ${data.dir.root}/${data.dir.store}. /alf_data/solr4/index/workspace/SpacesStore /alf_data/solr4/index/archive/SpacesStore
  • Delete all the Alfresco models for each Solr 4 core at ${data.dir.root}. /alf_data/solr4/model

  • Delete the contents of the /alf_data/solr4/content directory.

  • Start up the application server that runs Solr 4.
  • Start up the Alfresco application server (if not same as Solr 4 application server). It worked in our environment.

Update: This procedure works in most cases but after a situation where the system ran out of space left on device, the system remained in a unstable state and we were forced to restore a backup.