Skip to content
Snippets Groups Projects
Commit 3d7a69c4 authored by Demian Katz's avatar Demian Katz
Browse files

Attach Solr 3 error listener along with Solr 4 listener.

parent 0629854c
No related merge requests found
...@@ -31,6 +31,7 @@ namespace VuFind\Search\Factory; ...@@ -31,6 +31,7 @@ namespace VuFind\Search\Factory;
use VuFind\Search\Solr\InjectHighlightingListener; use VuFind\Search\Solr\InjectHighlightingListener;
use VuFind\Search\Solr\MultiIndexListener; use VuFind\Search\Solr\MultiIndexListener;
use VuFind\Search\Solr\V3\ErrorListener as LegacyErrorListener;
use VuFind\Search\Solr\V4\ErrorListener; use VuFind\Search\Solr\V4\ErrorListener;
use VuFindSearch\Backend\BackendInterface; use VuFindSearch\Backend\BackendInterface;
...@@ -184,7 +185,10 @@ abstract class AbstractSolrBackendFactory implements FactoryInterface ...@@ -184,7 +185,10 @@ abstract class AbstractSolrBackendFactory implements FactoryInterface
$mindexListener->attach($events); $mindexListener->attach($events);
} }
// Error listener, use SOLR 4.x by default // Attach error listeners for Solr 3.x and Solr 4.x (for backward
// compatibility with VuFind 1.x instances).
$legacyErrorListener = new LegacyErrorListener($backend);
$legacyErrorListener->attach($events);
$errorListener = new ErrorListener($backend); $errorListener = new ErrorListener($backend);
$errorListener->attach($events); $errorListener->attach($events);
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment