Skip to content

Commit

Permalink
Fix rebase/merge issues
Browse files Browse the repository at this point in the history
  • Loading branch information
frank-ulrich-weber committed Jun 18, 2024
1 parent cd9dbcc commit f750676
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 17 deletions.
22 changes: 11 additions & 11 deletions Classes/Common/Indexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ protected static function processLogical(Document $document, array $logicalUnit)
if (!empty($metadata)) {
$extConf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get(self::$extKey, 'general');
$validator = new DocumentValidator($metadata, explode(',', $extConf['requiredMetadataFields']));

if ($validator->hasAllMandatoryMetadataFields()) {
$metadata['author'] = self::removeAppendsFromAuthor($metadata['author']);
// set Owner if available
Expand Down Expand Up @@ -378,16 +378,16 @@ protected static function processLogical(Document $document, array $logicalUnit)
in_array('collection', self::$fields['facets'])
&& empty($metadata['collection'])
&& !empty($doc->metadataArray[$doc->toplevelId]['collection'])
) {
$solrDoc->setField('collection_faceting', $doc->metadataArray[$doc->toplevelId]['collection']);
}
try {
$updateQuery->addDocument($solrDoc);
self::$solr->service->update($updateQuery);
} catch (\Exception $e) {
self::handleException($e->getMessage());
return false;
}
) {
$solrDoc->setField('collection_faceting', $doc->metadataArray[$doc->toplevelId]['collection']);
}
try {
$updateQuery->addDocument($solrDoc);
self::$solr->service->update($updateQuery);
} catch (\Exception $e) {
self::handleException($e->getMessage());
return false;
}
} else {
Helper::log('Tip: If "record_id" field is missing then there is possibility that METS file still contains it but with the wrong source type attribute in "recordIdentifier" element', LOG_SEVERITY_NOTICE);
return false;
Expand Down
14 changes: 8 additions & 6 deletions Classes/Domain/Repository/DocumentRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -583,9 +583,9 @@ public function findChildrenOfEach(array $uids)
*
* @return SolrSearch
*/
public function findSolrByCollection(Collection $collection, $settings, $searchParams, $listedMetadata = null)
public function findSolrByCollection(Collection $collection, $settings, $searchParams, $listedMetadata = null, $indexedMetadata = null)
{
return $this->findSolr([$collection], $settings, $searchParams, $listedMetadata);
return $this->findSolr([$collection], $settings, $searchParams, $listedMetadata, $indexedMetadata);
}

/**
Expand All @@ -597,12 +597,13 @@ public function findSolrByCollection(Collection $collection, $settings, $searchP
* @param array $settings
* @param array $searchParams
* @param QueryResult $listedMetadata
* @param QueryResult $indexedMetadata
*
* @return SolrSearch
*/
public function findSolrByCollections($collections, $settings, $searchParams, $listedMetadata = null): SolrSearch
public function findSolrByCollections($collections, $settings, $searchParams, $listedMetadata = null, $indexedMetadata = null): SolrSearch
{
return $this->findSolr($collections, $settings, $searchParams, $listedMetadata);
return $this->findSolr($collections, $settings, $searchParams, $listedMetadata, $indexedMetadata);
}

/**
Expand All @@ -613,12 +614,13 @@ public function findSolrByCollections($collections, $settings, $searchParams, $l
* @param array $settings
* @param array $searchParams
* @param QueryResult $listedMetadata
* @param QueryResult $indexedMetadata
*
* @return SolrSearch
*/
public function findSolrWithoutCollection($settings, $searchParams, $listedMetadata = null): SolrSearch
public function findSolrWithoutCollection($settings, $searchParams, $listedMetadata = null, $indexedMetadata = null): SolrSearch
{
return $this->findSolr([], $settings, $searchParams, $listedMetadata);
return $this->findSolr([], $settings, $searchParams, $listedMetadata, $indexedMetadata);
}

/**
Expand Down

0 comments on commit f750676

Please sign in to comment.