Skip to content

Commit

Permalink
Enhance search all properties
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Richter committed Nov 28, 2024
1 parent 5de2392 commit 6ce9e4f
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Classes/Common/QueryParamsBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,14 @@ public function setSearchParams($searchParams): QueryParamsBuilder
$this->indexName = $this->params['index'];
} else {
$this->searchAll = true;
$this->indexName = Collection::wrap($this->settings)->
$indexNames = Collection::wrap($this->settings)->
recursive()->
get('entityTypes')->
pluck('indexName')->
pluck('indexName');
if ($indexNames->count() == 1) {
$this->searchAll = false;
}
$this->indexName = $indexNames->
join(',');
}

Expand All @@ -79,9 +83,9 @@ public function getQueryParams(): array
]
];

//if ($this->searchAll == false) {
if ($this->searchAll == false) {
$this->query['body']['aggs'] = self::getAggs($this->settings, $this->indexName);
//}
}

$this->setCommonParams();

Expand Down

0 comments on commit 6ce9e4f

Please sign in to comment.