Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-27248

Search indexing stops if any one indexer fails

    Details

      Description

      Occasionally, we need to rebuild all indexes using the Control Panel.

      If there is a problem/bug in a single Indexer (e.g. MediaWikiIndexer as per LPS-19591) then the indexing stops and other content types won't be indexed. In our case, the MediaWikiIndexer bug stops the DocumentLibrary indexer from having a turn.

      My proposal is to change to LuceneIndexer#reindex(Indexer) method to catch and log exceptions and then allow the next Indexer to continue, as follows:

          try {
            indexer.reindex(new String[] {String.valueOf(_companyId)});
      
            if (_log.isInfoEnabled()) {
              _log.info(
                "Reindexing with " + indexer.getClass() +
                  " completed in " + (stopWatch.getTime() / Time.SECOND) +
                    " seconds");
            }
          } catch (Exception e) {
            _log.error("Reindexing with " + indexer.getClass() + " failed", e);
          }
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  7 years, 29 weeks ago

                  Packages

                  Version Package
                  6.0.12 EE