cancel
Showing results for 
Search instead for 
Did you mean: 

SOLR indexes and error

romschn
Star Collaborator
Star Collaborator
Hi All,

I am using Alfrecso v 4.0.

I am getting below error continuously on my console. Could anyone please help me on that what could be the reason for this error?

org.json.JSONException: JSONArray[2] not found.
        at org.json.JSONArray.get(JSONArray.java:247)
        at org.json.JSONArray.getString(JSONArray.java:370)
        at org.alfresco.solr.client.SOLRAPIClient.getAclReaders(SOLRAPIClient.java:333)
        at org.alfresco.solr.tracker.CoreTracker.trackRepository(CoreTracker.java:1316)
        at org.alfresco.solr.tracker.CoreTracker.updateIndex(CoreTracker.java:491)
        at org.alfresco.solr.tracker.CoreTrackerJob.execute(CoreTrackerJob.java:45)
        at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:563)

Also, kindly let me know how to rebuild solr indexes for all existing contents in my repository.
4 REPLIES 4

nmcminn
Champ in-the-making
Champ in-the-making
Not sure about that error, is this a stock install or are there any customizations (content models, etc?)

Regarding how to rebuild your indexes here is a quick how-to:

1.      Stop Tomcat that runs Solr web application
2.      Remove index data of archive core at alf_data/solr/archive/SpacesStore
3.      Remove index data of workspace core at alf_data/solr/workspace/SpacesStore
4.      Remove cached content model info of archive core at alf_data/solr/archive-SpacesStore/alfrescoModels/*
5.      Remove cached content model info of workspace core at alf_data/solr/workspace-SpacesStore/alfrescoModels/*
6.      Restart Tomcat that runs Solr web application
7.      Wait a bit for Solr to start catching up…

This info was clipped from the blog post linked below (which provides a great deal of detail about Alfresco + SOLR integration).  If you have time, it is definitely worth a read.

http://ecmstuff.blogspot.com/2012/05/getting-going-with-solr-in-alfresco-4.html

romschn
Star Collaborator
Star Collaborator
When I performed the above steps and then I re-login to share, I could see that old contents created are not indexed and am not able to search that.
Could you please suggest?

nmcminn
Champ in-the-making
Champ in-the-making
When you clear the indexes in SOLR, it takes some time to rebuild them before content will be searchable.  SOLR is eventually consistent, and performs indexing of content in the background, unlike the older Alfresco Lucene indexer which indexes the content in-transaction or at startup if index rebuilds are enabled.

After a while (time will depend on repo size), the index should be completely rebuilt and search should work as expected.

andy
Champ on-the-rise
Champ on-the-rise
Hi

There is a bug where some characters in user or group names are not encoded correctly.
Thre is no work around for this - other than fixing up the issue in the data or using the Enterprise version.
If you enable the SOLR debug it will help you identify the problem authority.

Andy