Ibexa DXP Discussions

Community discussion forum for developers working with Ibexa DXP

Strange error from searchService

Suddenly I experience problems with $searchService->fintContent( $query ). I get this error message:

Uncaught PHP Exception eZ\Publish\Core\Persistence\Database\QueryException: "The expression ' OR ' expected at least 1 argument but none provided." at /ezplatform/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Persistence/Doctrine/DoctrineExpression.php line 78

My query is straitforward like this:

$query->query = new Query\Criterion\FullText( $searchTerm );

I’m on kernel 6.13 and use Legacy search.

Check that your $searchTerm variable is not empty. As far as I know, FullText criterion does not support searching with empty string.

For some reason the search term was no longer string. I cast it at such, and now it works again.