Extra debug in search.

This commit is contained in:
James Cole 2021-05-13 05:34:49 +02:00
parent e3efb23b78
commit 80384000c1
No known key found for this signature in database
GPG Key ID: B5669F9493CDE38D

View File

@ -259,11 +259,12 @@ class OperatorQuerySearch implements SearchInterface
case Emoticon::class: case Emoticon::class:
case Emoji::class: case Emoji::class:
case Mention::class: case Mention::class:
Log::debug(sprintf('Now handle %s', $class)); $words = (string)$searchNode->getValue();
$this->words[] = (string)$searchNode->getValue(); Log::debug(sprintf('Add words "%s" to search string, because Node class is "%s"', $words, $class));
$this->words[] = $words;
break; break;
case Field::class: case Field::class:
Log::debug(sprintf('Now handle %s', $class)); Log::debug(sprintf('Now handle Node class %s', $class));
/** @var Field $searchNode */ /** @var Field $searchNode */
// used to search for x:y // used to search for x:y
$operator = strtolower($searchNode->getValue()); $operator = strtolower($searchNode->getValue());
@ -545,9 +546,9 @@ class OperatorQuerySearch implements SearchInterface
$this->collector->amountLess($amount); $this->collector->amountLess($amount);
break; break;
case 'amount_more': case 'amount_more':
Log::debug(sprintf('Now handling operator "%s"', $operator));
// strip comma's, make dots. // strip comma's, make dots.
$value = str_replace(',', '.', (string)$value); $value = str_replace(',', '.', (string)$value);
$amount = app('steam')->positive($value); $amount = app('steam')->positive($value);
Log::debug(sprintf('Set "%s" using collector with value "%s"', $operator, $amount)); Log::debug(sprintf('Set "%s" using collector with value "%s"', $operator, $amount));
$this->collector->amountMore($amount); $this->collector->amountMore($amount);