Fix search result page.

This commit is contained in:
James Cole
2025-01-05 08:03:15 +01:00
parent 73104aae1f
commit b6960dc299
4 changed files with 8 additions and 3 deletions

View File

@@ -375,8 +375,10 @@ class GroupCollector implements GroupCollectorInterface
public function excludeSearchWords(array $array): GroupCollectorInterface
{
if (0 === count($array)) {
Log::debug('No excluded search words provided, skipping.');
return $this;
}
Log::debug(sprintf('%d excluded search words provided.', count($array)));
$this->query->where(
static function (EloquentBuilder $q) use ($array): void {
$q->where(
@@ -949,8 +951,10 @@ class GroupCollector implements GroupCollectorInterface
public function setSearchWords(array $array): GroupCollectorInterface
{
if (0 === count($array)) {
Log::debug('No words in array');
return $this;
}
Log::debug(sprintf('%d word(s) in array', count($array)));
$this->query->where(
static function (EloquentBuilder $q) use ($array): void {
$q->where(

View File

@@ -146,7 +146,7 @@ class OperatorQuerySearch implements SearchInterface
*/
public function parseQuery(string $query): void
{
app('log')->debug(sprintf('Now in parseQuery(%s)', $query));
app('log')->debug(sprintf('Now in parseQuery("%s")', $query));
/** @var QueryParserInterface $parser */
$parser = app(QueryParserInterface::class);
app('log')->debug(sprintf('Using %s as implementation for QueryParserInterface', get_class($parser)));