cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to rebuild SOLR Index

cfox570
Champ in-the-making
Champ in-the-making
Running Community 4.0.d
I noticed a problem where new content would not appear in the search results.  I found documentation that said to remove the index directory.   I stopped the server, removed the folder, restarted.   A new index folder was created.  But it appears that none of the repository documents are being indexed. Is there some other trick to kick into gear?

I have confirmed that index is working for new content only.  How do I force the indexing of all of the existing content?
23 REPLIES 23

lotharmärkle
Champ in-the-making
Champ in-the-making
I'm not sure if your question was "How to reindex with solr?"

My current best-practice-steps-to-full-reindex-with-solr are:

# stop repository
# remove index data of archive core at alf_data/solr/archive/SpacesStore
# remove index data of workspace core at alf_data/solr/workspace/SpacesStore
# remove cached model info of archive core at alf_data/solr/archive-SpacesStore/alfrescoModels/*
# remove cached model info of workspace core at alf_data/solr/workspace-SpacesStore/alfrescoModels/*
# restart repository
# wait some time…

Maybe you have missed the models?

…improvements are welcome! I don't know why the model info is stored besides the configuration files and not besides the index data, which would be a much better place for it (separating data from configuration pattern).

lothar

omkar
Champ in-the-making
Champ in-the-making
Hi Lothar, we faced a problem of solr index in Alfresco 5. The suggestion of deleting the data from the 4 folders and re-starting the server, that you have mentioned here has solved our problem. Thank you so much for your input Smiley Happy

Regards,
   Omkar.

cfox570
Champ in-the-making
Champ in-the-making
Thanks I will try that technique.

I have another problem that may or may not be related.
When I attempt to tag an item, the system reports an error that a tag cannot be created.

cfox570
Champ in-the-making
Champ in-the-making
Lothar,
I followed your procedure. And as before, SOLR will index new content only. The old content is not being indexed.  I am wondering if I have some corruption in the Alfresco store that prevents SOLR from working properly.

lotharmärkle
Champ in-the-making
Champ in-the-making
So you have to check:

* is there any error message in the logs - check catalina.out as well because solr errors do not go into alfresco.log
* enable solr logging to help identify the issues
* see if solr thinks it is up-to-date regarding its tracking status: http://wiki.alfresco.com/wiki/Alfresco_And_SOLR#FAQ
* are your "old" documents really indexed if you add them a second time now? Maybe there is a text-extraction issue.
* is it now just a permission issue?

Really - without an error message or detailed "steps to reproduce" it is rather difficult to give help.

cfox570
Champ in-the-making
Champ in-the-making
I cleared the index folders within ARCHIVE Spacestore and Workspace Spacestore.
I restarted and am getting a series of these errors:

org.springframework.scheduling.quartz.JobMethodInvocationFailedException: Invocation of method 'run' on target class [class org.alfresco.module.org_alfresco_module_wcmquickstart.jobs.FeedbackProcessor] failed; nested exception is org.alfresco.repo.search.impl.lucene.LuceneQueryParserException: 02300005 Request failed 404 /solr/alfresco/alfresco?q=%40ws%5C%3AratingProcessed%3A%22false%22&wt=json&fl=*%2Cscore&rows=2147483647&df=TEXT&start=0&locale=en_US&fq=%7B%21afts%7DAUTHORITY_FILTER_FROM_JSON&fq=%7B%21afts%7DTENANT_FILTER_FROM_JSON
Caused by: org.alfresco.repo.search.impl.lucene.LuceneQueryParserException: 02300005 Request failed 404 /solr/alfresco/alfresco?q=%40ws%5C%3AratingProcessed%3A%22false%22&wt=json&fl=*%2Cscore&rows=2147483647&df=TEXT&start=0&locale=en_US&fq=%7B%21afts%7DAUTHORITY_FILTER_FROM_JSON&fq=%7B%21afts%7DTENANT_FILTER_FROM_JSON
   at org.alfresco.repo.search.impl.solr.SolrQueryHTTPClient.executeQuery(SolrQueryHTTPClient.java:333)
   at org.alfresco.repo.search.impl.solr.SolrQueryLanguage.executeQuery(SolrQueryLanguage.java:49)
   at org.alfresco.repo.search.impl.solr.SolrSearchService.query(SolrSearchService.java:348)
   at org.alfresco.repo.search.impl.solr.SolrSearchService.query(SolrSearchService.java:152)
org.springframework.scheduling.quartz.JobMethodInvocationFailedException: Invocation of method 'run' on target class [class org.alfresco.module.org_alfresco_module_wcmquickstart.jobs.DynamicCollectionProcessor] failed; nested exception is org.alfresco.repo.search.impl.lucene.LuceneQueryParserException: 02300004 Request failed 404 /solr/alfresco/alfresco?q=%2B+TYPE%3A%22ws%3AwebassetCollection%22+%2B+%40ws%5C%3AisDynamic%3Atrue&wt=json&fl=*%2Cscore&rows=2147483647&df=TEXT&start=0&locale=en_US&fq=%7B%21afts%7DAUTHORITY_FILTER_FROM_JSON&fq=%7B%21afts%7DTENANT_FILTER_FROM_JSON
Caused by: org.alfresco.repo.search.impl.lucene.LuceneQueryParserException: 02300004 Request failed 404 /solr/alfresco/alfresco?q=%2B+TYPE%3A%22ws%3AwebassetCollection%22+%2B+%40ws%5C%3AisDynamic%3Atrue&wt=json&fl=*%2Cscore&rows=2147483647&df=TEXT&start=0&locale=en_US&fq=%7B%21afts%7DAUTHORITY_FILTER_FROM_JSON&fq=%7B%21afts%7DTENANT_FILTER_FROM_JSON
   at org.alfresco.repo.search.impl.solr.SolrQueryHTTPClient.executeQuery(SolrQueryHTTPClient.java:333)
   at org.alfresco.repo.search.impl.solr.SolrQueryLanguage.executeQuery(SolrQueryLanguage.java:49)
   at org.alfresco.repo.search.impl.solr.SolrSearchService.query(SolrSearchService.java:348)
   at org.alfresco.repo.search.impl.solr.SolrSearchService.query(SolrSearchService.java:152)
org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: org.springframework.scheduling.quartz.JobMethodInvocationFailedException: Invocation of method 'run' on target class [class org.alfresco.module.org_alfresco_module_wcmquickstart.jobs.FeedbackProcessor] failed; nested exception is org.alfresco.repo.search.impl.lucene.LuceneQueryParserException: 02300005 Request failed 404 /solr/alfresco/alfresco?q=%40ws%5C%3AratingProcessed%3A%22false%22&wt=json&fl=*%2Cscore&rows=2147483647&df=TEXT&start=0&locale=en_US&fq=%7B%21afts%7DAUTHORITY_FILTER_FROM_JSON&fq=%7B%21afts%7DTENANT_FILTER_FROM_JSON]
Caused by: org.springframework.scheduling.quartz.JobMethodInvocationFailedException: Invocation of method 'run' on target class [class org.alfresco.module.org_alfresco_module_wcmquickstart.jobs.FeedbackProcessor] failed; nested exception is org.alfresco.repo.search.impl.lucene.LuceneQueryParserException: 02300005 Request failed 404 /solr/alfresco/alfresco?q=%40ws%5C%3AratingProcessed%3A%22false%22&wt=json&fl=*%2Cscore&rows=2147483647&df=TEXT&start=0&locale=en_US&fq=%7B%21afts%7DAUTHORITY_FILTER_FROM_JSON&fq=%7B%21afts%7DTENANT_FILTER_FROM_JSON
Caused by: org.alfresco.repo.search.impl.lucene.LuceneQueryParserException: 02300005 Request failed 404 /solr/alfresco/alfresco?q=%40ws%5C%3AratingProcessed%3A%22false%22&wt=json&fl=*%2Cscore&rows=2147483647&df=TEXT&start=0&locale=en_US&fq=%7B%21afts%7DAUTHORITY_FILTER_FROM_JSON&fq=%7B%21afts%7DTENANT_FILTER_FROM_JSON
   at org.alfresco.repo.search.impl.solr.SolrQueryHTTPClient.executeQuery(SolrQueryHTTPClient.java:333)
   at org.alfresco.repo.search.impl.solr.SolrQueryLanguage.executeQuery(SolrQueryLanguage.java:49)
   at org.alfresco.repo.search.impl.solr.SolrSearchService.query(SolrSearchService.java:348)
   at org.alfresco.repo.search.impl.solr.SolrSearchService.query(SolrSearchService.java:152)
org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: org.springframework.scheduling.quartz.JobMethodInvocationFailedException: Invocation of method 'run' on target class [class org.alfresco.module.org_alfresco_module_wcmquickstart.jobs.DynamicCollectionProcessor] failed; nested exception is org.alfresco.repo.search.impl.lucene.LuceneQueryParserException: 02300004 Request failed 404 /solr/alfresco/alfresco?q=%2B+TYPE%3A%22ws%3AwebassetCollection%22+%2B+%40ws%5C%3AisDynamic%3Atrue&wt=json&fl=*%2Cscore&rows=2147483647&df=TEXT&start=0&locale=en_US&fq=%7B%21afts%7DAUTHORITY_FILTER_FROM_JSON&fq=%7B%21afts%7DTENANT_FILTER_FROM_JSON]
Caused by: org.springframework.scheduling.quartz.JobMethodInvocationFailedException: Invocation of method 'run' on target class [class org.alfresco.module.org_alfresco_module_wcmquickstart.jobs.DynamicCollectionProcessor] failed; nested exception is org.alfresco.repo.search.impl.lucene.LuceneQueryParserException: 02300004 Request failed 404 /solr/alfresco/alfresco?q=%2B+TYPE%3A%22ws%3AwebassetCollection%22+%2B+%40ws%5C%3AisDynamic%3Atrue&wt=json&fl=*%2Cscore&rows=2147483647&df=TEXT&start=0&locale=en_US&fq=%7B%21afts%7DAUTHORITY_FILTER_FROM_JSON&fq=%7B%21afts%7DTENANT_FILTER_FROM_JSON
Caused by: org.alfresco.repo.search.impl.lucene.LuceneQueryParserException: 02300004 Request failed 404 /solr/alfresco/alfresco?q=%2B+TYPE%3A%22ws%3AwebassetCollection%22+%2B+%40ws%5C%3AisDynamic%3Atrue&wt=json&fl=*%2Cscore&rows=2147483647&df=TEXT&start=0&locale=en_US&fq=%7B%21afts%7DAUTHORITY_FILTER_FROM_JSON&fq=%7B%21afts%7DTENANT_FILTER_FROM_JSON
   at org.alfresco.repo.search.impl.solr.SolrQueryHTTPClient.executeQuery(SolrQueryHTTPClient.java:333)
   at org.alfresco.repo.search.impl.solr.SolrQueryLanguage.executeQuery(SolrQueryLanguage.java:49)
   at org.alfresco.repo.search.impl.solr.SolrSearchService.query(SolrSearchService.java:348)
   at org.alfresco.repo.search.impl.solr.SolrSearchService.query(SolrSearchService.java:152)
:shock:

cfox570
Champ in-the-making
Champ in-the-making
Here is a link to a full days log file after I attempted to reindex:
https://forums.alfresco.com/en/viewtopic.php?f=9&t=43697

Here is a link to the most recent log file:

https://forums.alfresco.com/en/viewtopic.php?f=9&t=43697

lotharmärkle
Champ in-the-making
Champ in-the-making
02300005 Request failed 404 /solr/alfresco

The http status code 404 means NOT_FOUND. So there is no solr server running.
May be the catalina.out log file will tell you more - solr does not log to alfresco.log.

I cleared the index folders within ARCHIVE Spacestore and Workspace Spacestore.
What exactly did you remove? How does your alf_data/solr folder looks like now?

We were facing the same problems as well. Our environment: Alfresco 4.2, Redhat EL 6.3, custom installation with our own Tomcat 7.

In fact, we faced many problems that did not happen with Tomcat 6, and many of them turned out to be permissions problems. Not sure if Tomcat 7 is stricter than 6 in obscure ways. At any rate, one way to test would be to run Tomcat as root, then see if Solr is still unavailable - for us, it came up immediately (i.e. it finally picked up the solr.xml file under tomcat/conf/Catalina/localhost … prior to that, when running as "tomcat", it was ignored).

If that works (as it did for us), then make sure that everything under the tomcat and solr directories are owned by the tomcat user … even directories that appear to be read-only (e.g. the Catalina/localhost directories… the keystore directory … and so on). Then re-start tomcat but this time with the tomcat user. Worked for us!