Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-20770

Using "like" operator in Field criterion throws an exception

    Details

      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 );
      

        Activity

        Show
        Jérôme Vieilledent (Inactive) added a comment - Pull-request: https://github.com/ezsystems/ezpublish-kernel/pull/321
        Show
        Jérôme Vieilledent (Inactive) added a comment - Fixed in master: https://github.com/ezsystems/ezpublish-kernel/commit/b66f928207c9e1cbe86fed19eba50f8cd19579aa
        Hide
        Joao Pingo (Inactive) added a comment -

        Tested using tc-1623
        Test Passed QA Done

        Show
        Joao Pingo (Inactive) added a comment - Tested using tc-1623 Test Passed QA Done

          People

          • Assignee:
            Unassigned
            Reporter:
            Jérôme Vieilledent (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 4 hours
              4h