Details
-
Bug
-
Resolution: Fixed
-
Critical
-
5.0, 5.1.0rc1
-
None
Description
When trying to search for content with Public API using a Field criterion and the like operator (which is supported by the Field criterion at API level), an exception is thrown:
Unknown operator.
500 Internal Server Error - RuntimeException
in /Users/lolautruche/workspace/ezsystems/ezp-next/eZ/Publish/Core/Persistence/Legacy/Content/Search/Gateway/CriterionHandler/Field.php at line 189
Code used is the following:
$criteria = array( new ContentTypeIdentifier( 'test' ), new Field( 'title', 'like', 'foo' ) ); $query = new Query( array( 'criterion' => new Query\Criterion\LogicalAnd( $criteria ) ) ); $result = $this->getRepository()->getSearchService()->findContent( $query );