Skip to content
Snippets Groups Projects
Commit 239d433a authored by André Lahmann's avatar André Lahmann
Browse files

refs #9015:

* changed called searchbackend from Vufind to Solr
parent 058972f2
Branches
Tags
No related merge requests found
...@@ -1102,8 +1102,9 @@ class FincILS extends PAIA implements LoggerAwareInterface ...@@ -1102,8 +1102,9 @@ class FincILS extends PAIA implements LoggerAwareInterface
} }
} }
try { try {
// todo: compatible implementation for any SearchBackend (currently Solr only)
$query = $ilsIdentifier . ':' . $ilsId; $query = $ilsIdentifier . ':' . $ilsId;
$result = $this->searchService->search('VuFind', new Query($query)); $result = $this->searchService->search('Solr', new Query($query));
if (count($result) === 0) { if (count($result) === 0) {
throw new \Exception( throw new \Exception(
'Problem retrieving finc id for record with ' 'Problem retrieving finc id for record with '
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
* @link http://vufind.org/wiki/vufind2:record_drivers Wiki * @link http://vufind.org/wiki/vufind2:record_drivers Wiki
*/ */
namespace finc\RecordDriver; namespace finc\RecordDriver;
use VuFindSearch\Query\Query as Query;
/** /**
* finc specific model for MARC records with a fullrecord in Solr. * finc specific model for MARC records with a fullrecord in Solr.
...@@ -1452,7 +1453,7 @@ trait SolrMarcFincTrait ...@@ -1452,7 +1453,7 @@ trait SolrMarcFincTrait
preg_match("/^(\([A-z]*-[A-z0-9]*\))?\s*([A-z0-9]*)\s*$/", $value, $matches); preg_match("/^(\([A-z]*-[A-z0-9]*\))?\s*([A-z0-9]*)\s*$/", $value, $matches);
if (!empty($matches[2])) { if (!empty($matches[2])) {
$query = 'record_id:' . $matches[2]; $query = 'record_id:' . $matches[2];
$result = $this->searchService->search('VuFind', new \VuFindSearch\Query\Query($query)); $result = $this->searchService->search('Solr', new Query($query));
if (count($result) === 0) { if (count($result) === 0) {
$this->debug('Could not retrieve id for record with ' $this->debug('Could not retrieve id for record with '
. $solrField . ":" . $solrValue . $solrField . ":" . $solrValue
......
...@@ -93,8 +93,9 @@ class RecordLink extends \VuFind\View\Helper\Root\RecordLink ...@@ -93,8 +93,9 @@ class RecordLink extends \VuFind\View\Helper\Root\RecordLink
public function getRecordLink($id, $type = null) public function getRecordLink($id, $type = null)
{ {
try { try {
// todo: compatible implementation for any SearchBackend (currently Solr only)
$query = $type . ':' . $id; $query = $type . ':' . $id;
$result = $this->searchService->search('VuFind', new Query($query)); $result = $this->searchService->search('Solr', new Query($query));
if (count($result) === 0) { if (count($result) === 0) {
throw new \Exception( throw new \Exception(
'Problem retrieving record with ' . $type . ":" . $id 'Problem retrieving record with ' . $type . ":" . $id
......
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