Skip to content
Snippets Groups Projects
Commit c41c1c17 authored by Dorian Merz's avatar Dorian Merz
Browse files

refs #12309:

* changes in retrieval of hierarchy parent ID
* adds source_id parameter to SOLR-query in closure
parent 81dbd4ba
Branches
Tags
No related merge requests found
...@@ -1583,6 +1583,9 @@ trait SolrMarcFincTrait ...@@ -1583,6 +1583,9 @@ 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];
if ($sid = $this->fields['source_id']) {
$query .= ' AND source_id:'.$sid;
}
$result = $this->searchService->search('Solr', new 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 ' . $query); $this->debug('Could not retrieve id for record with ' . $query);
......
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