cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco upgrade solr vs solr4

srinivasr
Champ on-the-rise
Champ on-the-rise
Hi,

We are upgrading alfresco from 4.2 to 5.1. I followed the instructions from the below URL but there are lots of solr indexing errors after the upgrade.

http://docs.alfresco.com/5.1/tasks/upgrade-process.html

Did anyone upgraded successfully from 4.2 to 5.1?

I see solr and solr4 in 5.1 whereas in 4.2, only solr exists. Should i remove solr4 references from 5.1 or can both solr and solr4 coexist in 5.1?


alfresco-global.properties

### Solr indexing ###
index.recovery.mode=AUTO
index.subsystem.name=solr
dir.keystore=${dir.root}/keystore
#solr.host=localhost
solr.port.ssl=8443

solrcore.properties

data.dir.root=/opt/alfresco-community/alf_data/solr
data.dir.store=archive/SpacesStore
enable.alfresco.tracking=true
cache.alfresco.size=100
max.field.length=2147483647


here are some of the errors after the upgrade (deleted indexes from solr and deleted content from alfrescoModels).


INFO: Server startup in 161914 ms
2016-04-19 17:10:45,501  ERROR [solr.tracker.MetadataTracker] [SolrTrackerScheduler_Worker-19] First transaction was not found with the correct timestamp.
2016-04-19 17:10:45,501  ERROR [solr.tracker.MetadataTracker] [SolrTrackerScheduler_Worker-19] SOLR has successfully connected to your repository  however the SOLR indexes and repository database do not match.
2016-04-19 17:10:45,501  ERROR [solr.tracker.MetadataTracker] [SolrTrackerScheduler_Worker-19] If this is a new or rebuilt database your SOLR indexes also need to be re-built to match the database.
2016-04-19 17:10:45,502  ERROR [solr.tracker.MetadataTracker] [SolrTrackerScheduler_Worker-19] You can also check your SOLR connection details in solrcore.properties.
2016-04-19 17:10:45,518  ERROR [solr.tracker.MetadataTracker] [SolrTrackerScheduler_Worker-18] First transaction was not found with the correct timestamp.
2016-04-19 17:10:45,520  ERROR [solr.tracker.MetadataTracker] [SolrTrackerScheduler_Worker-18] SOLR has successfully connected to your repository  however the SOLR indexes and repository database do not match.
2016-04-19 17:10:45,520  ERROR [solr.tracker.MetadataTracker] [SolrTrackerScheduler_Worker-18] If this is a new or rebuilt database your SOLR indexes also need to be re-built to match the database.
2016-04-19 17:10:45,520  ERROR [solr.tracker.MetadataTracker] [SolrTrackerScheduler_Worker-18] You can also check your SOLR connection details in solrcore.properties.
2016-04-19 17:10:45,657  ERROR [solr.tracker.AbstractTracker] [SolrTrackerScheduler_Worker-18] Tracking failed
3 REPLIES 3

afaust
Legendary Innovator
Legendary Innovator
Since Alfresco 5.0 SOLR4 is the recommended and the default. SOLR (without 4) is only contained as a legacy component to potentially support restricted search capabilities while SOLR4 builds a new index. It is very likely that changes in Alfresco 5.1 geared towards SOLR4 have been so extensive that SOLR can no longer index new / updated content properly.

So - switch to SOLR4 (the one from the 5.1 distribution) and drop SOLR.

Regards
Axel

srinivasr
Champ on-the-rise
Champ on-the-rise
Thanks very much for your help. I switched to solr4 and cleared the indexes and it looks fine now. I can now filter the documents.

I see dataformat exception in the logs, is this related to solr4 indexing?


2016-04-20 10:38:48,902  ERROR [pdfbox.filter.FlateFilter] [http-bio-8443-exec-16] FlateFilter: stop reading corrupt stream due to a DataFormatException

2016-04-20 10:38:36,103  ERROR [fontbox.ttf.TrueTypeFont] [http-bio-8443-exec-28] An error occured when reading table post
java.io.IOException: Unexpected end of TTF stream reached
   at org.apache.fontbox.ttf.TTFDataStream.read(TTFDataStream.java:246)

afaust
Legendary Innovator
Legendary Innovator
Yes, this error very likely occurs during indexing when Alfresco tries to convert a PDF to plain text for full text indexing. The document metadata will still be indexed just fine, only the full text may not be searchable. Apparently a true type font is corrupt / not available.