Skip to content

Commit

Permalink
Make amount of children rows configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
beatrycze-volk committed Jun 14, 2023
1 parent bc68218 commit 2653e13
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Classes/Common/SolrSearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -377,11 +377,12 @@ public function submit($start, $rows, $processResults = true)
if ($this->searchParams['fulltext'] != '1') {
$documents[$doc['uid']]['page'] = 1;
$children = $childrenOf[$doc['uid']] ?? [];
$childrenRows = !empty($this->settings['childrenRows']) ? $this->settings['childrenRows'] : 100;
if (!empty($children)) {
$metadataOf = $this->fetchToplevelMetadataFromSolr([
'query' => 'partof:' . $doc['uid'],
'start' => 0,
'rows' => 100,
'rows' => $childrenRows,
]);
foreach ($children as $docChild) {
// We need only a few fields from the children, but we need them as array.
Expand Down

0 comments on commit 2653e13

Please sign in to comment.